Closed lkeyes closed 3 years ago
What happens if you try to merge them?
Hi..if I try to merge them before flattening, the field data are overwritten on each page. So, the result is that there will be multiple form pages, with each field containing the same data.
In Adobe Pro, the "Optimize" function will fix this....it strips out the form layer and just leaves the data visible. Once optimized, the form can't be used as a form anymore.... it simply displays whatever was entered originally on the form.
On Mon, Aug 10, 2020 at 3:18 PM Przemysław Kłys notifications@github.com wrote:
What happens if you try to merge them?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EvotecIT/PSWritePDF/issues/12#issuecomment-671539194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6A3JOGKQI7KV6KXPHZ5UTSABBXLANCNFSM4P2FUQDA .
-- Best wishes,
Larry Keyes lkeyes70@gmail.com
Can I please revive this request? I also need to be able to flatten the PDF. I am too much of a sissy to fix this issue myself and not too sure how to use github anyway, but the fix would be simply;
Have a look at https://kb.itextpdf.com/home/it7kb/examples/flattening-a-form.
Thanks, and great work.
I have just tested this, and it works fine. I cant work out how to change it here. Any chance someone else can do it (or tell me how)?
2 things need to be changed;
I have tested with the param set to true, false and null. all works as expected
The "online" way to do it is simply edit the file in GitHub.
When you do that, a new fork is created and you get your own version of code. Then you can keep editing until you're happy. And then you get an option to create PR.
My recommendations:
But also make it possible that if no FIeldNameAndValueHashtable is provided - it still works as expected just flattening the form.
It would be interesting to "improve" Merge-PDF with [switch] $FlattenForms or similar so that if there is a form detected it would flatten it during merge if requested.
Cool, learned something new today. Thanks! Good point with the switch too. Not sure why I did not think of that. Suggestion 2 already works that way. If no hash table is provided, the foreach will do nothing, still check the $Flatten switch and flatten empty. Tested this too.
If I get some spare time in the next few days, I will have a look at Merge-PDF. Should be doable.
This is now live. Thank you @markdem - I've improved the cmdlet a bit and added a test for flattening. I really appreciate it.
Hi...I'm attempting to craft a Powershell solution which merges a series of existing PDF Forms, which "flattens" the forms prior to adding them to the merged PDF. I want the original data displayed that was put into the form, but I don't care that the form functionality is lost. I was hoping this might be available in PSWritePDF. -- Thanks!