in reply to Re: docx to html conversion.
in thread docx to html conversion.
I've tried use unoconv again to convert docx into html,
the final product was not really desirable, but was able to produce docx into html with couple tweeaks.
If anybody needs reference, below is the example code / unix line I've worked with.
`unoconv --stdout -f html "$docxfileloc" > "$htmfile"`; my $t = HTML::TreeBuilder ->new_from_file("$upload_dir/$htmfile"); my $body = $t->look_down(_tag => q{body}); my @content = $body->detach_content; #grep body my $html = $_->as_HTML for @content; #exclude <body>, </body> tag $html = decode_entities($html); #decode special characters
|
|---|