LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pragmatically append pages to a PDF file

I do a lot of antenna polar plots that I print to Adobe Acrobat to turn into PDF files. I usually print the first page and enter the file name of the PDF file. Then for subsequent pages I use the "Labview Document.pdf" default and manually append the new page to the old document by dragging the thumbnail from one open document to another. This is very tedious. Is there a way that I can rather than over write a file I can append to my original document? I can have up to a thousand polar plots in a set. I want to program a routine so that I can put a plot on each page in a single file without operator intervention.

Norm
0 Kudos
Message 1 of 2
(3,605 Views)
Norm,

There is surely a way to do this from LabVIEW via an Acrobat API of some kind, but I don't have Acrobat installed here, so I can't explore that very easily.

Alternatively, there are some command-line tools out there that you can install and execute from LabVIEW to accomplish this regardless whether Acrobat is installed or not. The best tool I found was a free, open-source program called pdftk ("the pdf toolkit"), available at http://www.accesspdf.com/pdftk/.

Installation is easy: just download the Windows version (assuming you're on Windows), unzip it, and copy the pdftk.exe file into your C:\Windows\system32 directory. I attached a simple VI that demonstrates how to call the tool from LabVIEW. It works like a champ on the PDF files I practiced with.

Take care,
John

P.S. As an aside, and for anyone stumbling across this thread with an interest, there are some great open-source PDF writer tools out there as well, in case you don't want to have to purchase Acrobat in order to create PDF files. My favorite is PDF Creator.
Message 2 of 2
(3,597 Views)