Loosing forms during conversion

Bug #1851693 reported by J-K on 2019-11-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I compressed a PDF with forms but unfortunately the forms are lost. I was hoping only the images in the PDF would get compressed.

I'm using version 1.4.2 on Ubuntu 18.04.3

Ricardo Ferreira (ricardofcf) wrote :

Thanks for your bug report.

Could you please attach the PDF file causing this behaviour? Have you managed to duplicate this using other documents?

Changed in compress-pdf:
status: New → Incomplete

I attach a PDF with forms which are lost during conversion.
I have not tried another PDF with forms. Maybe I'll find one on my disk to test.

Here is another PDF where the forms get lost during conversion: Checkboxes can't checked anymore, text can't written in text fields after conversion.

oriolpont (oriolpont) on 2019-11-10
Changed in compress-pdf:
status: Incomplete → New
oriolpont (oriolpont) on 2019-11-10
Changed in compress-pdf:
status: New → Triaged
oriolpont (oriolpont) wrote :

J-K, I checked your files, and the forms appear correctly rendered, be them empty or filled.

The script uses GhostScript (gs) as the backend. GhostScript flattens the PDF, which means that the ability to further fill or edit the forms gets lost.

Unfortunately, there is nothing we can do at the level of Compress-PDF: GhostScript would need to add the functionality to conserve the editability of forms. See this discussion https://ghostscript.com/pipermail/gs-devel/2009-January/008141.html (from over 10 years ago, so do not expect it for any time soon).

Workaround: If you are producing the PDFs, consider compressing the images first. If instead you are the final user, then fill the forms first prior to compressing them (rendering should be preserved correctly in all cases).

@ oriolpont: Thanks for the information! I'm a user and have to send the PDFs to the final user. They need the forms to get the information out of the files.
Now I used Master PDF Editor to compress the images or rather delete them (as they are just logos). So the files are at least a little bit smaller now.

Changed in compress-pdf:
status: Triaged → Won't Fix
Ricardo Ferreira (ricardofcf) wrote :

I've changed this to Won't fix because, as orolpoint stated, the problem here is Ghostscript itself. However, maybe we could try to identify PDFs with forms and work around that. I can't try it right now, but it looks like pdfinfo can identify AcroForm and XFA so that could be a way to warn the user that Compress-PDF won't work. If we could actually identify the pages with forms, maybe we could split the PDF, compress all pages without forms and reassemble it after.

Changed in compress-pdf:
status: Won't Fix → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers