Created attachment 194948 [details] The PDF generated with Gotenberg My final goal is to generate a PDF of type PDF/A. I use Gotenberg to generate this kind of PDF from HTML code, who uses your soft in order to convert PDF into PDF/A. I created an issue on their repo originally, and they redirected me to you: https://github.com/gotenberg/gotenberg/issues/911 You can find in the issue the HTML code used to generate the PDF file in attachment. When I open this PDF in LibreOffice generated from Gotenberg, the rendering does not correspond to what is expected. The text is not justified, and the elements overflow from the main container which contains the overflow: hidden property. If I open this PDF with another PDF viewer, all is OK. See in the resulted PDF file before PDF/A conversion. Thanks.
Created attachment 194950 [details] PDF saved from Chromium print dialog Bad idea for this gotenberg software to treat PDF as a format you re-open and re-save. PDF is an export-only format.
LibreOffice "native" documents are to OASIS ODF 1.3 standard (as extended). ALL Other formats are non-native and make use of import/export filters. PDF has two filters available for import: poppler based PDF read into cairo libs to render into LO drawing objects, and pdfium libs to render to raster image with high fidelity to original PDF. With either filter path a PDF is not editable in LibreOffice and depending on need inserting as an image may be more useful to import as LO draw shapes and text boxes. If you start with an ODF document, or just the text from some external format, Writer can print/export to PDF/A No such handling for round-trip of a PDF. Specific issue of CSS handling in PDF/A is Not Our Bug. If there were an issue it would be with poppler or the pdfium project. But mute as this is out of scope for LO ODF usage. => WF
Just checked and the pdfium based Insert -> Image filter handling of the PDF delivers a well formed rendering of the PDF. While the poppler -> cairo based Import "open" of the attachment 194948 [details] PDF exhibits the same overflow of the gotenberg processor. Still not in scope for LibreOffice, and a clear => WF
So if I understand correctly, the problem comes from the Poppler library. I will try to open a bug report on their repository. Are there any specific details I should provide about how you are using it in this particular case? Thanks
@Miklos, any suggestion for the OP
I'm not really familiar with our poppler code; I would just echo what Buovjaga wrote in comment 1: best to assume that once you created a PDF, you can only annotate it, you can't edit it. (export-only/append-only format).