I am developing a document-pdf conversion (.docx, .pptx, .xlsx to .pdf) function in a Django apps. I am running the following codes in AWS lightsail(linux). The conversion will take place in a linux environment.

I have some header format issue and page issue after I converted from .docx to .pdf using libre office. Libre Office Version: LibreOffice 6.1.5.2 10(Build:2).

Header format Issue: the font is overlapping on my logo

Page Issue: Extra blank page causing number of page increase (19 pages in .docx but 20 pages in the pdf file I converted)

Is there any possible solution/suggestion I can use to fix this issue?

Original from .docx : Originally, the logo and words are not overlapping

First Trial: Direct Converted .docx to .pdf

`command = ["lowriter", "--headless", "--convert-to", "pdf", "testing.docx"]
subprocess.run(command)`

Result: Words are overlapping on the logo

Second Trial: Converted .docx to .odt before convert to .pdf I tried to convert to .odt before convert to .pdf but the result still the same. I realized the overlapping issue is there after I convert .docx to .odt

`command = ["lowriter", "--headless", "--convert-to", "odt", "testing.docx"]
subprocess.run(command)`

Result: Words are overlapping on the logo

1

There are 1 best solutions below

0
On

LibreOffice Writer Headers are not compatible with MS-Word. While there is substantial compatibility there are features in each package that are unique.