These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Dynamically merge PDFs based on a form?

dmbrennan
Registered: Oct 25 2011
Posts: 2

I'm posting to the general board because I'm not really sure what product would best meet our needs (or if it's even possible). Basically, we want to "dynamically build" a PDF document based on a checklist.
 
We have a manual we need to distribute to a diverse group of users. Our vision is that we would have one file for people to download, with a checklist of the different sections of the document. They would select the items they wanted, and it would "build" a document that only contained those sections.
 
I know that's a rather cryptic description, but hopefully it's enough to start some dialogue so we can get a sense of where to look. Thanks in advance.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This type of dynamic build is entirely possible. In fact it's been done many times. But not with Acrobat. You need to create this solution with a server side script, and a PDF library. There are many of them out there, such as iText, QuickPDF, PDF.Net, etc. There are also third party tools such as Appligent and activePDF that will provide most of the solution for you. All depends on how much you know and how much money you want to spend. For example, you could use iText to put together a free solution pretty quickly, if you know Java.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

dmbrennan
Registered: Oct 25 2011
Posts: 2
Thanks for the fast response. iText looks nice and not too cumbersome (and they do have a C# build which is what we use).

We may end up distributing this manual on a CD or via e-mail. So, we had originally envisioned using a PDF or something self-contained, because it would be 'simpler' - as in, everything is contained in a single file, with nothing resident on a server, etc. Although perhaps we could package it up into a small self-installed executable. Not as 'lightweight' but I suppose that could be workable.

What do you think?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
It is not practical to build a PDF Concatenation application within a PDF. It could be done with either a plug-in or even an automation script, but these are things the user would have to install, and they require Acrobat Professional (since Acrobat does all the heavy PDF lifting). To do this effectively you really need an external application and a PDF Library. So, you could write a .Net program as a self contained package. That would work.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

maxwyss
Registered: Jul 25 2006
Posts: 255
Thomp's suggestion will lead to "better" and more efficient PDFs, so my suggestion may have more "academic" value.

It would be possible to customize documentation using Acrobat JavaScript. One approach would be to have a master document containing all options. Part of that master document would be a control page, or you would set up a control document (either way works). In the control document, you can select the options for that particular instance of the document. A "create instance" function then would delete all the pages not selected, and assuming that you have a field on the control page, or a logic, it also could save the new document under a pre-defined name.

You would need trusted functions in order to save, but that is not really critical, because we can assume that creating those instances would happen only on a small number of controlled workstations.

Thomp also mentioned applications to do the merging. It would be very easy to make the control document create a command file for AppendPDF.

Hope this can help.

Max Wyss.