Loosing forms during conversion

Bug #1851693 reported by J-K
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compress-PDF
Triaged
Undecided
Unassigned

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

Revision history for this message
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
Revision history for this message
J-K (johannes-out-of-the-forest) wrote :

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.

Revision history for this message
J-K (johannes-out-of-the-forest) wrote :

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)
Changed in compress-pdf:
status: Incomplete → New
oriolpont (oriolpont)
Changed in compress-pdf:
status: New → Triaged
Revision history for this message
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).

Revision history for this message
J-K (johannes-out-of-the-forest) wrote :

@ 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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.