I've got a problem merging two pdf files in our evaulation phase (switching from iText).
The goal is to concatenate two pdf document, both of them having AcroForms.
1) Am I right that jpod does not provide a "merge utility" to this conveniently ?
2) I appended as a first step *one* page of doc2 at the end of doc1. Result: theAcroForm of the first page from doc2 in the resulting larger pdf is gone. How can you safely concatenate / append two pdf documents both having AcroForms ?
Much thanks in advance!
1) You are right
2) This is a complicated task. You deal with at least 3 different data structures here. First, the page and its content stream itself. I assume you got this working (you see a new page with the content of the source). Second, you must copy all annotations from the source page. Third, you must sort in the copied form annotations into the acro form hierarchy of the target. We have got helper classes with many hundred lines to get this done right under all (most) circumstances… If you have the forms of both documents under control, you may get by with fewer.
I'm sorry i can't help you more - even extracting this code and making it open source would take hours.
Thank you for your conceptual answer explaining the complete desired task.
I think you should sometimes provide that code and make it open source.
Generally jPod library has its strength, but I'm sorry to say that its API is very verbose, you'll miss many conveniences and helper classes.
For example: one thing that is very disappointing: inserting an image needs a helper class from the JPod Renderer project - but this is a GPL project so you have to licence …
Nevertheless, keep up the good work and think it over providing helper and convenience methods/classes to the open source community.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.