Appending – Putting It All Together

Appending – Putting It All Together

Adding Comments

Comments in your parameter file are lines of text that you don’t want to be read by AppendPDF Pro or AppendPDF. They can be either notes to yourself or descriptions of what something does or is used for, which can be useful if others will be accessing the file. Additionally, comments can be used for testing or debugging. You may want to prevent a file from being used in the source list, instead of deleting and retyping the name of the file you can simply “comment it out”. Comments start with the hash or number symbol: # and must be placed at the beginning of a line:

#This is a comment in my parameter file.

The following is an incorrect comment:

begin_source #beginning of the file list

Note: AppendPDF Pro or AppendPDF reads the first line of a parameter file as the name to call the new, appended document. Therefore, if a comment is on the first line of a parameter file and is not preceded by a #, AppendPDF Pro or AppendPDF will think it is the name for the output file. There will be no error messages generated during processing and the output file name will be the text of the comment and it will be written to the AppendPDF Pro or AppendPDF directory. The file will not have a .pdf extension. Remember the # before all comments.

Complete Parameter File Example

Now that we have gone through all of the pieces of a parameter file, we show one in its entirety. This example is almost the same as the sample paramscomplete.txt parameter file that comes with your copy of AppendPDF Pro. The example below uses all the parameter options.

Note: AppendPDF does not support all of the options in this example, however there are two example files located in the Samples directory where you installed AppendPDF. They are parameters.txt and tutorial.txt.

#Complete Parameter file for use with AppendPDF Pro with a cover letter

#Name for the new, appended file

#List of files and pages for appending with text for Table of Contents
./samples/pdfs/sample1.pdf,1,-1,(sample document 1)
./samples/pdfs/sample2.pdf,1,-1,(sample document 2)
./samples/pdfs/sample3.pdf,1,-1,(sample document 3)
./samples/pdfs/sample4.pdf,1,-1,(sample document 4)

#Cover page block
CoverPage (./samples/pdfs/lettersample.pdf)
StampFile (./samples/stampfiles/letterstamp.txt)

#Table of Contents block
TOCPage (./samples/pdfs/toc.pdf)
StampFile (./samples/stampfiles/tocstamp.txt)
BookMarkText (TOC Page)
HeaderHeight (100)
FooterHeight (240)
LeftMargin (20)
RightMargin (20)
FontName (Helvetica)
FontSize (14)
ColorSpace (DeviceRGB)
Red (0)
Blue (44)
Green (87)
LineSpace (3)
Leader (.)
PageColumnWidth (40)

#document info block
Title (AppendPDF Pro Test)
Subject (testing AppendPDF Pro with sample files)
Author (Appligent, Inc.)
Keywords (testing AppendPDF Pro sample files)
ExtraText (AppendPDF Pro document)
DocDate (D:20170714235659)

#Extras block for Stamp Files
Open_Mode (ShowBookmarks)
View_Mode (FitPage)

#End of parameter file

The parameter file is a text document which requires the new file name and the list of documents to append. The document information is optional. The Cover page, TOC, and Extras blocks are also optional and used only with AppendPDF Pro.

When this example file is run with AppendPDF Pro, the user will get an output file called appendprocomplete.pdf that contains all of the pages listed in the Source files block of the parameter file.

When File > Document Properties or File > Properties is selected in Acrobat, the Title, Subject, Author, and Keywords fields will be populated with the information as shown in the Document Info block of the sample parameter file. A custom string and date have been added for searching with Acrobat Catalog.

The pages of the appended documents (not the cover or the table of contents) will be stamped by the stamp file listed in the Extras block.