Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
When I am using a html document ('
SimplePage.html
') with the following content
<!DOCTYPE html>
<title>Page Title</title>
This is just a simple Hello World
</body>
</html>
Libreoffice (LibreOffice_5.1.2 on Windows 7) produces an pdf having the first page blank and then writing not the full text - instead only "a simple Hello World" is shown
I am using the following command line
soffice.exe --headless --convert-to pdf SimplePage.html
When I do the conversion not in headless mode (opening Libreoffice writer and the using "Export" the generated pdf is correct. Therefore I think it's not a problem of the used HTML.
Does anyone know the reason and a solution to this problem?
–
–
You should try writhing this:
soffice.exe --headless --norestore --writer --convert-to pdf YOURFILE
it worked for me, the point was to add --writer option
–
i ran into this issue recently, even with writer_pdf_Export, and discovered that adding a Content-Security-Policy meta tag seemed to resolve it. i used...
<meta http-equiv="Content-Security-Policy" content="sandbox">
and this seems to resolve the hello-world case above as well...
<!DOCTYPE html>
<meta http-equiv="Content-Security-Policy" content="sandbox">
<title>Page Title</title>
</head>
This is just a simple Hello World
</body>
</html>
(checked using the current LibreOffice 7.0.4.2)
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.