Closed akorobkin closed 1 year ago
I have done a quick check and can repsoduce this bug with libcupsfilters 2.x and cups-filters 2.x, but, with the attached example, and also with data/form_english.pdf
included in the libcupsfilters source repository.
I have tried with several other forms, there the filled in data does not get lost.
@jberkenbilt, @dheeraj135 it seems that there are certain form types where our current, QPDF-based flattening does not work. Could you have a look?
I've been a bit swamped but will try to find time to look at this in the next few days.
Sorry for the long delay. I have identified the issue, and it's basically a one-line change. What I need to do is figure out how we've gone this many years without having seen this before, because it seems like a really obvious mistake. I also need to make sure I have a test case for it. I'll try to get a fix in main this weekend if possible.
I'm going to work this as qpdf/qpdf#949 which is caused by the same underlying issue.
I figured out what's going on here. The PDF file in question is using the /AS
key (appearance state) incorrectly, but qpdf can easily work around it.
I have installed QPDF 11.4.0 as of https://github.com/qpdf/qpdf/issues/949 now and tested the command line of the initial posting again. The new QPDF indeed fixes this bug. Closing ...
Thanks a lot for the quick fix and release, @jberkenbilt !
OS: Debian testing, cups-filters: 1.28.16-1+build3
How to reproduce:
lp
command.When opened with a PDF viewer, the form will have the entered data. However, when printed, the data will be lost.
It seems that
pdftopdf
filter is doing this. Running cupsfilter to apply just thepdftopdf
filter to a simpleform.pdf
file returns a flattened file with no entered data.Original form.pdf and resulting form-flattened.pdf are attached.
Note how the Question 1 is still there, but the answer
444
is lost in the flattened document.