Testing your Parameter Files
A parameter file test should be used to make sure all of the documents are being appended in the way that you expect, and the Table of Contents is formatted properly (AppendPDF Pro only). You can use a parameter file with one or two page documents so you can quickly check results and make small adjustments to margins, colors, line spacing, leaders, etc. You can use a source files block that consists of more than one instance of the same one page file for a very simple test. For example:
<appendparam version="1.0"> <!-- Output file --> <outputpdf> <file> /outputfilepath/output.pdf </file> </outputpdf> <!-- Begin source files --> <sourcepdfs> <!-- First input file --> <inputpdf> <file> /inputfilepath/Sample1.pdf </file> <!-- First TOC entry --> <TOCEntry> Sample A </TOCEntry> </inputpdf> <!-- Second input file --> <inputpdf> <file> /inputfilepath/Sample1.pdf </file> <!-- Second TOC entry --> <TOCEntry> Sample B </TOCEntry> </inputpdf> <!-- End of input files --> </sourcepdfs> <!-- End of source files --> <TOC> <file> /tocfilepath/TOC.pdf </file> </TOC> </appendparam>
This will append two /inputfilepath/Sample1.pdf files, each with a different TOC entry, and save the file as /outputfilepath/output.pdf.
Paramsletter Example
The following puts together the examples we’ve been using throughout this section in the file, paramsletter.xml. For clarity, the following example does not use full path names. We recommend that you use full path names for all files.
<appendparam version="1.0"> <!-- Output File --> <outputpdf> <!-- Specify output file --> <file>./samples/paramsletter_xml.pdf</file> </outputpdf> <!-- Begin Source PDFs --> <sourcepdfs> <inputpdf> <!-- First input file --> <file>./samples/pdfs/sample1.pdf</file> <!-- Start at page 1 to end of the file --> <startpage>1</startpage> <endpage>-1</endpage> <!-- TOC entry for file 1 --> <TOCEntry>sample document 1</TOCEntry> </inputpdf> <inputpdf> <!-- Second input file --> <file>./samples/pdfs/sample2.pdf</file> <!-- Start at page 1 to end of the file --> <startpage>1</startpage> <endpage>-1</endpage> <!-- TOC entry for file 2 --> <TOCEntry>sample document 2</TOCEntry> </inputpdf> <inputpdf> <!-- Third input file --> <file>./samples/pdfs/sample3.pdf</file> <!-- Start at page 1 to end of the file --> <startpage>1</startpage> <endpage>-1</endpage> <!-- TOC entry for file 3 --> <TOCEntry>sample document 3</TOCEntry> </inputpdf> <inputpdf> <!-- Third input file --> <file>./samples/pdfs/sample4.pdf</file> <!-- Start at page 1 to end of the file --> <startpage>1</startpage> <endpage>-1</endpage> <!-- TOC entry for file 4 --> <TOCEntry>sample document 4</TOCEntry> </inputpdf> </sourcepdfs> <!-- End source PDFs --> <!-- Begin Cover Page Block --> <coverpage> <!-- Coverpage template --> <file>./samples/pdfs/lettersample.pdf</file> <!-- Stamp file for cover page --> <stampfile>./samples/stampfiles/letterstamp.txt</stampfile> </coverpage> <!-- End Cover Page Block --> <!-- Begin TOC Block --> <TOC> <!-- TOC template file --> <file>/samples/pdfs/toc.pdf</file> <!-- Stampfile for TOC --> <stampfile>./samples/stampfiles/tocstamp.txt</stampfile> <!-- Alternate bookmark text for TOC --> <bookmarktext>TOC Page</bookmarktext> <!-- 1.4 inches header down to beginning of TOC entries --> <headerheight>100</headerheight> <!-- 3 1/3 inches footer up to bottom of TOC entries --> <footerheight>240</footerheight> <!-- Left margin 1/4 inch --> <leftmargin>20</leftmargin> <!-- Right margin 1/4 inch --> <rightmargin>20</rightmargin> <!-- Helvetica font for TOC entries --> <fontname>Helvetica</fontname> <!-- Font size for TOC entries is 14 pt --> <fontsize>14</fontsize> <colorspace> <!-- Colorspace RGB --> <devicergb> <!-- RGB color is 0, 87, 44 - Dark Green --> <red>0</red> <green>87</green> <blue>44</blue> </devicergb> </colorspace> <!-- Triple spaced text --> <linespace>3</linespace> <!-- Add additional 3 lines after TOC entries --> <appendblanklines /> <!-- Leader looks like this ......... --> <leader>.</leader> <!-- Width of column for TOC page numbers: about 1/2 inch --> <pagecolumnwidth>40</pagecolumnwidth> </TOC> <!-- End of the TOC --> <!-- Begin Info Block --> <docinfo> <!-- Specify Author as "Appligent, Inc" --> <infopair> <key>Author</key> <value>Appligent, Inc.</value> </infopair> <!-- Specify Title as "AppendPDF Pro Test" --> <infopair> <key>Title</key> <value>AppendPDF Pro Test</value> </infopair> <!-- Specify Subject as "testing AppendPDF Pro with sample files" --> <infopair> <key>Subject</key> <value>testing AppendPDF Pro with sample files</value> </infopair> <!-- Specify the following Keywords: testing AppendPDF Pro appending assembly --> <infopair> <key>Keywords</key> <value>testing AppendPDF Pro sample files</value> </infopair> <!-- Specify a custom info field of ExtraText as "AppendPDF Pro document" --> <infopair> <key>ExtraText</key> <value>AppendPDF Pro document</value> </infopair> <!-- Specify custom info field of DocDate --> <!-- as the date "July 14, 2007,11:20:56 pm" --> <!-- Local time 4 hours later than Universal time --> <infopair> <key>DocDate</key> <value>D:20000714235659</value> </infopair> </docinfo> <!-- End of Docinfo --> <!-- Begin Extras Block --> <extras> <!-- Zoom to fit the page when document is opened --> <viewmode> <fitpage /> </viewmode> <!-- Show bookmarks in the navigation pane when the document is opened --> <openmode> <showbookmarks /> </openmode> </extras> <!-- End of Extras information--> </appendparam> <!-- End of parameter file-->