When converting any .doc file to an .html file, I always encounter the following tag forcing line breaks:
<p style=“font-size:11pt; line-height:115%; margin:0pt 0pt 10pt”><span style=“font-family:Calibri; font-size:11pt”>
Because of this, when I try to make a round trip back to .doc, I get extra lines saved in the edited .doc file.
Any hints/help?
Thanks,
Troy
Hi Troy,
Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.
Tahir,
I’ve narrowed the issue down.
for (Section section : document.getSections())
{
section.getHeadersFooters().linkToPrevious(false);
}
The above code removes all headers except for the first page so that the HTML output only contains one header. However, if no header exists a newline is appended and therefore causes my issue. Is there a nicer way to output header (perhaps hidden) to HTML?
As you requested, my test document is also attached.
Thanks,
Troy
I did remove that for loop, but I still appear to receive new lines at the end of my document.
Troy