We've been using PDFSharp to fill in forms using a database and it's worked great.

Up until now we just open a pre-made PDF for modify, fill in the AcroForm fields using the database and then save to stream (so the original file doesn't change). Again, so far so good.

Now however we'd like to use a single page PDF as a template and repeat it per database record so the final result is a multi-page PDF with each page being the same except the values in the AcroForm fields which are populated differently for each database record.

Looking at the samples for combining PDFs I can make a new PDF and import the page from the template PDF for each record but opening the template for Import and copying the page doesn't seem to bring the AcroForm. Also most of the AcroForm fields in the API seem to be read-only and I suspect even if I can get it into the new document if the fields all have the same name then they'll share a single value instead of different values for page... so I'll need to rename the fields in the generated document with maybe a count on the end. For example:Template Field Name: NameGenerated Document Field Name: Name1, Name2, Name3...Name{N} where {N} is the number of pages.

Is this even possible with PDFsharp? Anyone have any experience with something like this or have another way to accomplish it that I'm not thinking of?

Who is online

Users browsing this forum: Baidu [Spider] and 11 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum