HELIOS PDF Handshake 2.0 User manual


6 Exploding/concatenating files using "pdfcat"
6.1 Program behavior and defaults
The "pdfcat" program is a command line tool that allows you to explode or concatenate PDF files on the server. Using "pdfcat" is indispensable if you have a multi-page document that is to be used in an EPSF-only or in an OPI workflow. The OPI Server e.g. will generate a layout file of the first document page only - so if you want to have a layout of document page 2, you have to extract the desired page and create a new single-page PDF file. The illustration below shows the three different program modes that are all independent of one another and do exclude each other: The "concatenate" mode merges the selected PDF files into a new one, the "append" mode appends the selected files to an existing one, and the "extract" mode writes the selected pages of an existing document into new single-page files.

Please note that ...
Every PDF file contains a list of file infos such as creator, creation date, modification date, image profiles (optional). Furthermore, a PDF file may contain security settings (optional), a table of contents (TOC) and annotations such as text fields, buttons, etc.
The "pdfcat" program re-arranges PDF files and creates new ones. The file infos, profiles, security settings, TOC, and annotations are handled as follows:
pdfcat -o
pdfcat -a
pdfcat -e
For OPI users only
Automatic layout generation is not available for PDF files that have been created with "pdfcat". You have to use our "touch" application or the command line layout program on the server to generate layouts from the new PDF files.
6.2 List of parameters
The "pdfcat" program recognizes the following parameters:
pdfcat -h
pdfcat -o outDoc inDocs ...
pdfcat -a outDoc inDocs ...
pdfcat -e prefix inDoc
-h
opens the online help file.
-o
concatenates existing PDF documents (inDocs...) to a new PDF document (outDoc). With this parameter, you have to specify one output file name and one or more input file names. It is possible to copy only selected pages from the input file to the output file by specifying page ranges. Valid ranges are listed in paragraph Page ranges below.

Important: If the name you choose for the output file already exists in the destination directory, the existing file will be replaced.

-a
appends one or more PDF documents or parts of them (inDocs...) to another - already existing - PDF document (outDoc).
-e
extracts of a given PDF document (inDoc) either all pages, or the pages you select explicitly, and creates new single-page PDF files. With this parameter, you have to specify a prefix for the output files. Page number <nnn> of the input file will then be copied to a new PDF document named "<prefix><nnn>.pdf".

Note: File name specifications may contain a complete UNIX path name that leads to another directory.

Page ranges
Each inDoc specification can be followed by a comma-separated list of range specifications. Thus, you can make sure that only the specified pages of the input documents are used.
Valid range specifications are shown in the example below:
You can specify several - comma-separated - ranges at a time (e.g. inDoc.pdf,3-6,12-). Do not use blanks within such a specification.
6.3 Examples
pdfcat -o new.pdf doc1.pdf doc2.pdf,2,5-7
writes all pages of document "doc1.pdf" and the pages 2, 5, 6, 7 of document "doc2.pdf" to a new document called "new.pdf".
pdfcat -o new.pdf doc1.pdf,\$-1
writes all pages of document "doc1.pdf" in reverse order to a new document called "new.pdf".
pdfcat -a tmp.pdf doc1.pdf,9-6
appends the pages 9, 8 , 7, 6 (in this order) of document "doc1.pdf" to an existing document called "tmp.pdf".
pdfcat -e page doc1.pdf,-3
writes the pages 1, 2, 3 of document "doc1.pdf" to new single-page documents called "page1.pdf", "page2.pdf", and "page3.pdf".

© 2002 HELIOS Software GmbH