You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am hard at work and busy providing Unicode/CJKV support.
Please consider backing pdfcpu as a sponsor if you want to keep this project going.
The ❤️ button is right at the top of the ReadMe.
Thank you for using pdfcpu 💚
Reacted by Stefan Schroeder, Roman Rylov and Eduardo Mior
I tried to do PDF form filling myself, and it almost works but doesn't completely.
The easy part is to go through the PDF form fields and set the correct V field.
The hard part is to set the AP default appearance.
I tried to "delete" it and set NeedAppearances. What happens is AcroReader then regenerates some of them, but about half of them still show up empty! And I need to click inside and re-save (which makes NeedAppearances useless...)
Maybe it's something with this specific form, but some appearances are just not regenerating in Acrobat Reader.
I lack the knowledge to re-create the AP myself on the form :(
I hope it will include recreating the AP appearances :D and not just relying on NeedAppearances. I see you already do create appearances in a different part of the code (where you create text fields from scratch), so I guess you already have that :)
NeedAppearances seems a bit buggy, at least in Acrobat. I tried to study how AP streams work, and where to get the fonts reference, and my brain got too tired. :) I tried to look how iText does that and 💀 so complex. (And it is buggy too.)
yes looking forward to that. Btw pdfcpu is a great package, it allowed me to look inside PDF and play with it. Thanks a lot
Hi!
Are you trying to modify a PDF form that was not created with pdfcpu?
Then issues are expected and need to be followed up.
Please open a new issue.
Thank you!
Activity
hhrutter commentedon Sep 20, 2018
Hi!
Form filling is definitely in the pipeline.
What's your definition of "flattening"?
braindev commentedon Sep 20, 2018
A flattened PDF wouldn't allow the form fields to be edited.
EDIT:
I'm borrowing the term from pdftk
see: https://www.pdflabs.com/docs/pdftk-man-page/#dest-output-flatten
[-]PDF Form filling?[/-][+]PDF Form filling[/+]zbruhnke commentedon Dec 14, 2019
@hhrutter any timeline around this? It's something we're thinking about as well
StefanSchroeder commentedon Sep 23, 2020
@hhrutter Any updates on this issue? Not pushing, just asking.
hhrutter commentedon Sep 27, 2020
Hello!
I am hard at work and busy providing Unicode/CJKV support.
Please consider backing pdfcpu as a sponsor if you want to keep this project going.
The ❤️ button is right at the top of the ReadMe.
Thank you for using pdfcpu 💚
kben commentedon Apr 15, 2021
@hhrutter Thanks for this incredible library, I just found it. Can I somehow support you with Code on this feature?
hhrutter commentedon Apr 15, 2021
👍 Thanks, that's already being worked on.
Happy to take all your issues once it is released.
karelbilek commentedon Mar 22, 2022
I tried to do PDF form filling myself, and it almost works but doesn't completely.
The easy part is to go through the PDF form fields and set the correct V field.
The hard part is to set the AP default appearance.
I tried to "delete" it and set NeedAppearances. What happens is AcroReader then regenerates some of them, but about half of them still show up empty! And I need to click inside and re-save (which makes NeedAppearances useless...)
Maybe it's something with this specific form, but some appearances are just not regenerating in Acrobat Reader.
I lack the knowledge to re-create the AP myself on the form :(
hhrutter commentedon Mar 22, 2022
This feature will be part of the next release.
Stay tuned 👍
karelbilek commentedon Mar 23, 2022
I hope it will include recreating the AP appearances :D and not just relying on NeedAppearances. I see you already do create appearances in a different part of the code (where you create text fields from scratch), so I guess you already have that :)
NeedAppearances seems a bit buggy, at least in Acrobat. I tried to study how AP streams work, and where to get the fonts reference, and my brain got too tired. :) I tried to look how iText does that and 💀 so complex. (And it is buggy too.)
yes looking forward to that. Btw pdfcpu is a great package, it allowed me to look inside PDF and play with it. Thanks a lot
eduardo-mior commentedon May 30, 2022
I'm looking forward to it.
Any predictions for when this will be released?
@hhrutter I am very grateful for your work.
dingyaguang117 commentedon May 31, 2022
@eduardo-mior @karelbilek @braindev @zbruhnke @StefanSchroeder @kben
Hi guys, I implemented form-filling based on pdfcpu's low-level API. Just for reference.
hhrutter commentedon May 31, 2022
It is being worked on. See above.
karelbilek commentedon May 31, 2022
@dingyaguang117 huh interesting. Is "watermark" how it fills the AP appearance streams? Or is it a different thing?
dingyaguang117 commentedon May 31, 2022
Filling-form is based on modifing the value of V key (Text Field) and AS key(Button Field) in annotations.
0q2 commentedon Jan 6, 2023
It's been four years, any updates?
hhrutter commentedon Jan 6, 2023
This is part of the upcoming release which is all about form processing.
Please bear with me 🙏
hhrutter commentedon Mar 1, 2023
=> https://github.com/pdfcpu/pdfcpu/releases/tag/v0.4.0
karelbilek commentedon Mar 2, 2023
Hah good. As I promised to you one time on slack, I will try various PDFs I have to get you bugs for this, if I find them
kben commentedon Mar 3, 2023
Hi, I just had the change to try the new implementation. But get the following error when trying to fill a textfield:
writing x.pdf...
pdfcpu: dict=<<
<AP, <<
<N, (757 0 R)>
>>>
<DA, (/Helv 12 Tf 0 g)>
<F, 4>
<FT, Tx>
<Ff, 0>
<P, (741 0 R)>
<Rect, [413.50 545.75 565.20 568.80]>
<Subtype, Widget>
<T, (Textfield-5)>
<TU, (857 0 R)>
<Type, Annot>
<V, (��FDSA)>
Any idea what's happening here?
hhrutter commentedon Mar 4, 2023
Not sufficient for analysis.
I need to see more of what you are doing
an please open a new issue.
kben commentedon Mar 4, 2023
Using the follwoing PDF:
https://www.aok.de/pk/magazin/cms/fileadmin/pk/rheinland-hamburg/pdf/antrag-leistungen-pflegeversicherung.pdf
hhrutter commentedon Mar 4, 2023
Hi!
Are you trying to modify a PDF form that was not created with pdfcpu?
Then issues are expected and need to be followed up.
Please open a new issue.
Thank you!
enahs commentedon Mar 5, 2023
@kben please link the issue here. seeing a similar problem on a 3rd party pdf fill.
kben commentedon Mar 5, 2023
See bugreport #571