AppendPDF and AppendPDF Pro – The Source Files Block
The Source Files Block is required. Following the first line of the parameter file is the list of input or source files that AppendPDF Pro or AppendPDF will use to create the new document. Before beginning the list you must enter the keyword begin_source and at the end of the list insert the keyword end_source. Files will be appended in the order that they appear in the source files list. After each filename are commas and page numbers; this is the notation that AppendPDF Pro and AppendPDF uses for specifying pages and page ranges. Specifying pages is discussed in detail below.
This is an example source file block:
begin_source Sample1.pdf Sample2.pdf,1,2 Sample3.pdf,1,1 Sample3.pdf,3,3 Sample4.pdf,2,4 end_source
It is important to make sure that none of your source files have names with commas in them. Since AppendPDF Pro and AppendPDF uses commas for describing page ranges, it will try to interpret any comma it sees as being a part of page information. Each parameter file can have only one source files block. Extra source blocks will be ignored.
Specifying page ranges in your source files block
In AppendPDF and AppendPDF Pro page ranges are delimited by commas. In the source files block shown above, each file has a range of pages specified. The different ways for specifying which pages you want to use are described below. When specifying pages do not insert spaces between file names and commas, or commas and numbers.
- If no pages are specified with a file, all pages from that file will be appended to the new document. For example:
- To specify a single page to append from a file, after the file name add a comma, the page number to be appended, another comma and the same page number. This indicates that the beginning and ending page are the same, as in Sample3.pdf below:
- To specify a range of pages place a comma after the file name, the number of the first page in the range, another comma, and the last page number of the range. The following example of Sample4.pdf specifies the range of pages 2 through 4:
- To specify multiple, non-contiguous pages from a single document, multiple entries need to be made in the parameter file. Below, see that Sample3.pdf is listed twice, once to add page 1 and a second time to add page 3:
Note: This is the only way to avoid appending page 2 for this file.
- To specify all pages from a specific page in a document, list the starting page only. Appending will start from this page and go to the end of the document. The sample below will append pages 2 through the end of Sample3.pdf:
- To specify that only the last page of a document be appended, use the special notation -1 as shown with Sample2.pdf below:
Note: The -1 notation for last page can be used with page ranges. As shown in the example below, the second through the last page of sample4.pdf will be appended: