Home

PDF Command Line Suite, User Manual

image

Contents

1. 6 2 Split a PDF document into several documents or extract pages from a document Functionality and Options Select Individual Pages or Ranges of Pages Select page 1 pdsel 1 in pdf out pdf Select pages 1 and 3 5 pdsel 1 3 5 in pdf out pdf Selecting a specific page more than once which repeats the page without using more space pdsel 1 3 2 in pdf out pdf Remove Annotations Remove all annotations on pages 1 to 3 pdsel a 1 3 in pdf out pdf PDF Tools AG Premium PDF Technology 7 1 PDF Command Line Suite Version 4 5 Page 35 of 63 November 26 2015 pdw Description 7 2 pdw is a tool to list all text tokens in a PDF document The output is x y font size text width rotation Note there is a newer and more enhanced text extraction tool available by PDF Tools AG the 3 Heights PDF Extract Shell http www pdf tools com asp products asp name EXPS Functionality and Options C 0 r u W Break down Text Blocks to Individual Character List all characters separately pdw c in pdf Add Carriage Return before New Lines Depending on the platform this option should be used in combination with the option u pdw u cr in pdf List the Annotations in a Separate File pdw o out txt in pdf Take Account of the Page Rotation The option r takes account of page rotation This is useful for documents with rotated page and rotated text on the rotated pages which
2. destination The destination of the bookmark If the text contains blanks this parameter must be in quotes Example Step 1 Create Control File Create a text file with the following content and name it ink tmp Bookmarks 0 PDF Tools http www pdf tools com 1 CLS http www pdf tools com asp products asp name CLS Step 2 Add Bookmarks with Links Add the link using the following command pdcat b 1 link tmp in pdf out pdf Note that on Unix platforms the end of a link is defined by a CR whereas on Windows it is CR LF Create a Free Text Annotation A Free Text annotation is an rectangular annotation that contains text and is always visible i e does not have an open or close status Page Number The page number of a Free Text annotation is set using the keyword Page followed by the actual page number Page 1 Style The font style is defined using the keyword ont followed by a series of parameters font FontName FontSize Alignment TextColor BgColor Where the meaning of the parameters are FontName The font name Must be one of the 14 PDF standard fonts These are Times Roman Helvetica Courier Symbol Times Bold Helvetica Bold Courier Bold ZapfDingbats Times Italic Helvetica Oblique Courier Oblique Times BoldItalic Helvetica BoldOblique Courier BoldOblique FontSize The font size in points Alignment The alignment supported values are L R and C for left right
3. TOOLS COM Premium PDF Technology PDF Command Line Suite Version 4 5 User Manual Contact pdfsupport pdf tools com Owner PDF Tools AG Kasernenstrasse 1 8184 Bachenb lach Switzerland www pdf tools com Copyright 2000 2015 PDF Command Line Suite Version 4 5 Page 2 of 63 November 26 2015 Table of Contents Table of Contents uuuzuunannannnnnannnnnannannannunnunnunnunnunnunnunnunnnunnunnunnunnunnannannunnen 2 1 OverVieW unnnannannunnannunnunnunnunnunnnunnunnunn an nun nam nun nun nun nun nun nunnunnnnnnunnunnann un nam nenne 6 1 1 The Different Tools A re Ya e on Oe eA FEE Ru 6 1 2 Using the Tools z ai ru t e Fux salue tali ELA rad UR DU Su Rp ERR BURN Wally e 7 2 License Management uuzunanunnanannnnunnanunnanannanunnanunnanunnanunnanunn ana uu uu uan 8 2 1 Graphical License Manager TOO cceeeeeeee eset eee e ee eee eee ene eee nena tenets 8 List all installed license KeYS ccccceee eee ee eee eee eee nn nenne nnn nennen nun nennen nen 8 Add and delete license Keys 2 a ande EN e ht 8 Display the properties of a license uassesersnnennnnennnnen nennen nenne nenne nennen 9 Select between different license keys for a single product 9 2 2 Command Line License Manager Tool ssssssssseem mee 9 List all installed license keyS nunnennennennennennen nn ents 9 Add and delete license keys iriran euina noieira nin
4. Description ieieeiieei etiem ilk ua flit e ik RE E A Sali eR hl land 54 16 2 Functionality and Options sssssssssssssseeemmen nenne nenne mene 54 Simple Merge of PDF Files sans ran 54 C Create a Table of Contents sesssssssssessssese meme 54 t Merge PDF Files and Add Individual Outlines eese 55 WP Specify Javascript Code nuserensnnennenennnnnnnn nenne nennen nennen nennen nen 55 Use a Control File oeste toast a ee ceat eri ai E Mana ata 56 17 pdinfo unuenunnanunnanunnnnunnanunnanunnnnannanunnanannanannanannanannanannanannanannanannanannanen 57 18 pdobj unuenunnanunnununnanunnanunnanannnnunnanannanannnnannanannanannanannanannanannanannanannnen 58 19 pdlS iulii iie error raro ssnuuuEu oS ananas Sansa au aaa aS RERREESSRRRRREERRERREUSEASRESSEaaEA 59 20 COM Interface uananuanannananunnannnnannnnunnnnannnnannnnannnnannnnannnnannanannnnannanannunn 60 20 8 OVERVIEW cic cto en rn DD DSH 60 20 2 InstallatiOnczs iiem e ere Fux AR tale Re suc ue Pe ult 60 20 3 Example Sirenian ora Ri re an EE TE a RET EINE ww E Ve E aic 61 DOC AAC ON ars CE 61 Parameter Passirig eot eee ex Dune ov prx salewhehdauled nce rele IRE UU RET Kan 61 EXGCULIOMN eu EE 61 Appendix A Security uuuunnanannanannanannanannanunnanannanannanannanannanannanannanannanannanannanen 62 Appendix B Link Definition Files for pdcat esee nnn 62 PDF Tools AG Pr
5. lt lt Type Catalog Pages 274 0 R OpenAction 279 O R AcroForm 280 0 R Outlines 243 0 R gt gt lt lt Type Pages Kids 2730 R 275 O R Count 11 gt gt lt lt CreationDate D 19960913110306 Producer Acrobat Distiller 3 0 for Macintosh Author Adobe Systems Incorporated Creator PageMaker 6 0 Title Why To Buy ModDate D 19961023133930 Subject Why to Buy Adobe Acrobat 3 0 Keywords Adobe Acrobat 3 0 gt gt With the option o output txt the output can be redirected to a specified file pdinfo o output txt c acrobat3 reader acrobat pdf PDF Tools AG Premium PDF Technology 18 PDF Command Line Suite Version 4 5 Page 58 of 63 November 26 2015 pdobj Prints the attributes of a PDF object The objects can be printed by providing the object number as parameter For example use pdobj to print the OpenAction object of the file acrobat pdf pdobj c acrobat3 reader acrobat pdf 279 S GoTo D 281 0 R Fit gt gt With the option o output txt the output can be redirected to a specified file pdobj allows you to walk through all objects of a PDF document and see their content and properties The use of this tool requires profound knowledge about PDF See PDF Reference manual http www pdf tools com public downloads pdf reference pdfreference16 pdf PDF Tools AG Premium PDF Technology 19 PDF Command Line Suite Versi
6. NUMBER DST NAME VIEW X VIEW Y 11 a quoted string e g in pdf INTEGER NUMBER INTEGER NUMBER Bookmark NL BOOKMARK ENTRY NL LEVEL TITLE BM DESTINATION NUMBER starting at 0 max 4 max one more than previous a quoted string e g Overview and Introduction PAGE IN SAME DOC FILE NAME PAGE NUMBER bs NUMBER sets the Border value of link annotations O no border box 1 red dashed 2 solid red 3 green dashed 4 solid green 5 blue dashed 6 solid blue other numbers of the form YXBGR will result in box with red R 10 green G 10 blue B 10 dash length X dash space Y values of 9 are mapped to 1 rather than 0 9 The separator between symbols is one or several blanks ASCII 32 The comment character is the number sign Example Sample link definition file for pdcat 0 Overview 1 0 Chapter 1 2 I Section 1 1 3 Page 1 bs 56 56 bs 227 Page 2 Bookmark 40 682 80 12 0 S0 2 4 link to pdinfo 40 607 20 12 0 32 4 pdftools pdf 3 92 278 pdcat 12900 blue dashed 76 773 76 30 24 127 68 http www pdf tools com web link 227 76 773 76 30 24 127 68 http www pdf tools com web link PDF Tools AG Premium PDF Technology
7. account too i e needs to be enlarged too to the same size as the crop box PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 14 of 63 November 26 2015 Assuming the input file has a size of A4 0 0 595 842 the following command will increase the crop and media box by 50 points in each direction pdcat crop 50 50 645 892 box 50 50 645 892 in pdf out pdf Create Bookmarks for each Input File Create a bookmark called BM 1 for the first document create a bookmark called BM 2 for the second bookmark pdcat I BM 1 inl pdf I BM 2 in2 pdf out pdf Use a Control File The switch I can be used for different purposes It always requires an external control file which contains a series of commands The control file is a text file containing the commands to create one or several of the items below e Link annotation to another page or an URL e Bookmark with a link e Free Text annotation Lines in the control file that start with a semicolon are comments This is a comment User s Tip The positioning of annotations use the coordinate system of the PDF document to which they are added Most documents have a media box with its origin 0 0 in the lower left corner However the media box could also have different coordinate e g lower left corner at 50 100 If an annotation is added to such a document at position 0 0 its left border is 50 points outside
8. does not cover all features but only common features and meaningful use cases For undocumented features please refer to the usage PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 8 of 63 November 26 2015 License Management 2 1 There are three possibilities to pass the license key to the application 1 The license key is installed using the GUI tool Graphical user interface This is the easiest way if the licenses are managed manually It is only available on Windows 2 The license key is installed using the shell tool This is the preferred solution for all non Windows systems and for automated license management 3 The license key is passed to the application at runtime via the command line switch El property This is the preferred solution for OEM scenarios Graphical License Manager Tool The GUI tool LicenseManager exe is located in the bin directory of the product kit r amp PDF Tools License Mai File Edit Help X e Add Key Delete Refresh List All Users Current User License Properties 3 Heights TM Document Converter Name Value f 0 10A0M TARF HEN Key 0 J0A94 DPGU La f 0 BCASN vDI ESTG LIFE RICH FOREN Product 3 Heights TM Image 3 Heights TM Image to PDF Converter API f Intended Use Productive V wv 0 J0A94 ii Un oil u ee Y Platform Windows 3 Heights TM Image to PDF Converter Servi
9. file This is controlled by the option b meaning do split according to bookmarks The program can also selectively extract a particular chapter if the corresponding bookmark title is specified e g b Chapter one one pdf For other options supported by pdsplit see the usage message which can be retrieved when calling the program without any parameters 5 2 Functionality and Options Split Files and name Output Files By default the created files have the following file name xx page number gt pdf xx is a prefix that can be modified and page number is at least two digits long The following command splits the file big pdf into individual pages and names the resulting files xxO1 pdf xx02 pdf etc pdsplit big pdf When you specify a second argument the links and file names will be generated according to given the format in this case small0O1 pdf smallO02 pdf etc pdsplit big pdf small 3 3d pdf Note that you must specify a printf conforming format The argument supplied to the format is always an integer number the page number Therefore you can use d for decimal x for hexadecimal u unsigned decimal or o octal If you specify s char string pdsplit will crash because the page number will not be a valid string address By using pdsplit as shown in the command below you can change the links between the resulting PDF files to web links that invoke a servlet method on the web serve
10. is denied The following flags are defined for 128 bit encryption PDF 1 4 Acrobat 5 0 i Disable editing of form fields e Disable extraction of text and graphics d Disable document assembly q Disable high quality printing The flag 5 can be used in combination with one of the old flags to force 128 bit encryption without setting any of the i e d or q flags Note that using any of these Acrobat 5 related flags will produce a file that cannot be opened with older versions of Acrobat Appendix B Link Definition Files for pdcat The structure of a link definition file is composed as follows EBNF syntax LINK FILE 4 LINK SECTION BOOKMARK SECTION LINK SECTION PAGE HEADER NL BOX SETTING LINK NL NL new line in text file PAGE HEADER PAGE NUMBER INTEGER NUMBER Page PAGE NUMBER omit quotes in file INTEGER NUMBER a number decimal e g 1 2 3 99 LINK RECTANGLE DESTINATION RECTANGLE X COORD Y_COORD HEIGHT WIDTH X_COORD NUMBER Y_COORD NUMBER HEIGHT NUMBER PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 63 of 63 November 26 2015 WIDTH DESTINATION PAGE_IN_SAME_DOC EXTERNAL_DEST FILE_NAME VIEW X VIEW Y BOOKMARK SECTION BOOKMARK ENTRY LEVEL TITLE BM DESTINATION BOX SETTING NUMBER PAGE IN SAME DOC EXTERNAL DEST INTEGER NUMBER the page number FILE NAME PAGE
11. is no longer available instead it is bundled to the PDF Command Line Suite 20 2 Installation Before the COM interface can be used it must be registered using the Windows tool regsvr32 exe Copy the pdapp dil into the installation directory e g C Program Files PDF Tools bin In the command prompt type regsvr32 exe and specify the name of the DLL as a parameter If you are on Windows Vista the command prompt must run under administrator i Command Prompt C Program Files PDF Tools AGNbin gt regsur32 pdapp dll C Program Files PDF Tools AG Nbin gt Upon this command you should receive a message box confirming the successful registering of the DLL SE 86x y i DilRegisterServer in pdapp dll succeeded PDF Tools AG Premium PDF Technology 20 3 PDF Command Line Suite Version 4 5 Page 61 of 63 November 26 2015 Examples The COM interface works very much like the command line interface except that the parameter list must be constructed via the API It is not possible to pass it as one single string In Visual Basic 6 the COM interface is used as shown below Declaration Dim obj As New PDAPPLib PDCat Note that you must add the PDAPPLib type library to the references of the Visual Basic project to make this work Alternatively you can use the CreateObject method Dim obj As Object Set obj CreateObject PDApp PDCat Parameter Passing The AddParameter method is used to co
12. pdf If no transformation matrix is provided the default transformation matrix 1 0 O 1 O 0 is applied The above commands are therefore equal to the following commands pdcat logo 1 0 0 1 0 0 logo pdf page pdf foregound pdf pdcat bglogo 1 0 0 1 0 0 logo pdf page pdf backgound pdf 3 Page Page Page Page Page Page Page Page 4 Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Pabe Pegga FN Page Pabe Pag e FRE Page Page Page Pai amp ao amp Page Page Pai amp ao amp Page Page P MPa Re Pal Page P MPa Se Palle Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page ge Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Pag Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page g e Fy ggrmage Page LT cem amp Pog Woe gef Se Pao Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page P Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page foreground pdf background pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Pag
13. the file system use launch pdwebl joins text fragments before performing match text can have varying font size the size of the last fragment determines the height of the link box Functionality and Options Add URL Links to a PDF Document Add the web link http www pdf tools com to all keywords PDF Tools in the document in pdf pdwebl in pdf out pdf PDF Tools http www pdf tools com Add Page links to a PDF Document To all keywords file2 in in1 pdf add a link to the document in2 pdf pdwebl inl pdf out pdf file2 in2 pdf To all keywords command in file1 add a link which launches the command shell pdwebl inl pdf ouin pdf command launch C winnt system32 command com Add Java Scripts Add Java Scripts to a PDF document stored on a text file and add a link to it pdwebl infile odf out pdf action js file js Read Input File from Standard Input See switch I PDF Tools AG Premium PDF Technology q S PDF Command Line Suite Version 4 5 Page 39 of 63 November 26 2015 Define Key Link Pairs in a File or Standard Input Instead of providing the key link pairs as parameter on the command they can be passed as file parameter using switch I Example using a File Create a text file with one key link pair per line case sensitive e g like this PDF Tools http www pdf tools com google http www google com Save that text file and name it for example pairs txt Then execu
14. the media box and its bottom is 100 points above to bottom of the page Applies to Link Annotations and Free Text Annotations Create Link Annotations Link annotations supported by pdcat represent either a link to a destination in another PDF document or URL Page Number A link annotation starts with the required keyword Page followed by a number which defines on what page number the link annotation is to be added Commands after the keyword Page are applied to the selected page number until a new keyword Page or Bookmark is set Page 1 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 15 of 63 November 26 2015 Border Style Link annotations that point to anther page or an URL can optionally have rectangular borders A border style is specified as bs DLBGR whereas the number after bs has 5 digits with the following meaning D Distance between dashes in points 0 9 L Length of dashes in points 0 9 B Blue value 0 9 G Green value 0 9 R Red value 0 9 Example A red dashed line is bs 33009 A grey line is bs 00555 Destination The link annotation pointing to a page in another document or an URL is specified as X Y height width path pagenr X offset Y offset or X Y height width URL Where the meaning of the parameters are X x position of left lower corner of the annotation rectangle Y y position of the left lo
15. visually appears to be not rotated However this option can always be turned on pdw r in pdf List the Text in Unicode Encoding pdw u in pdf Break down Text Blocks to Blank Separated Words This option starts a new text token when one of the following criteria is fulfilled PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 36 of 63 November 26 2015 e There is one or more blank characters e The distance between two characters is 20 or more of the font size only applies if there is kerning in the TJ operator If the option w is not set a new text token starts when two characters are at least 50 of the font size apart pdw w in pdf PDF Tools AG Premium PDF Technology 8 1 PDF Command Line Suite Version 4 5 Page 37 of 63 November 26 2015 pdform Description 8 2 The pdform tool displays information about text form fields or fills in data into form fields Note there is a professional form filling tool available by PDF Tools AG which also supports flattening merging the form fields with the page content i e burn the fields on the page so they are no longer editable Functionality and Options Fill in data Assuming in pdf contains a form field called fieldO1 its content can be set like this pdform in pdf out pdf field0l Hello World Add a new form field Add a new form at page 1 coordinates 50 50 width 200 height 25
16. 150 points from the bottom Step 2 Add Link Annotation Add the link annotation defined in the control file using the following shell command pdcat 1 link tmp in pdf out pdf Example 2 Create a Link annotation to an URL A link annotation pointing to an URL is constructed in a very similar way as a link annotation to another file see Example 1 The first 4 parameters for the link rectangle remain the same As 5 and last parameter the URL is provided as shown in the sample below Step 1 Create Control File Create a text file with the following content and name it ink tmp Page 1 bs 33009 100 100 200 200 http www pdf tools com Step 2 Add Link Annotation Add the link using the following command pdcat 1 link tmp in pdf out pdf Create Bookmarks with Links Bookmarks are created by using the keyword Bookmark without parameters in the control file Subsequent lines after the keyword define one bookmark each Each line consists of three parameters level description destination Where the meaning of the parameters are level The depth of the bookmark A level 0 bookmark is a top level or root bookmark PDF supports a maximum bookmark depth of 28 levels description The displayed text of the bookmark If the text contains blanks this PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 17 of 63 November 26 2015 parameter must be in quotes
17. DF Technology PDF Command Line Suite Version 4 5 Page 55 of 63 November 26 2015 Document Properties Description Security Fonts Initial view Custom advanced r Custom Properties Name Jeottomm Change Value foo Delete Font Helvetica 14 PARASPACE 20 RIGHTM 200 XYL 40 180 18 name which must be different from the standard property names found on other Document You can add custom properties to this document Each custom property requires a unique Q Properties panels Example that creates a table of contents as first page it contains the same entries as the outlines one and two pdmerge c template pdf t one inputl pdf t two input2 pdf out pdf The table of contents can be inserted at any position Each document that is added a title using the switch t is listed in the table of contents Merge PDF Files and Add Individual Outlines The following command merges the two input files in1 pdf and in2 pdf It adds the outlines 2 bookmarks Chapter 1 and Chapter 2 which point to the beginning of each document pdmerge t Chapter 1 inputl pdf t Chapter 2 input2 pdf out pdf Specify Javascript Code These options specify a Javascript for Will Save WS and Will Print WP document actions The Javascript is read from a file The following command specifies the Javascript from the file willsave script as the Will Save document action of the output file pdmerge W
18. File from Standard Input ss sssssssssrssssrrsrrrenrrrrsrrrrsren 38 Define Key Link Pairs in a File or Standard Input 39 q QUITE oro Mr 39 S Set the border style of links ssssssssrsssrrssrrrrsrrnrsrrnnsrrnnsrrnnerrnens 39 10 pdtoc n ilninnASGLBIG LGB inc 41 10 1 Description serere ih eb uk re EIE eI CER E 41 10 2 Functionality and Options ssssssssssssssseee mmm 41 b Create or Omit Bookmarks essssssssessenm mene 41 I Set New Titles es uer ee rene ean Eee Ea AR TREE VA RARE Eee 41 d Place the Current Date on the Pages sececeeeee eee ee eset neta tees 41 W Set the amp P ge Width ns ee dre I nnn tnra een 41 t Place a Header Text on the Pag S sececeeeeeee teste teste ee eeeeeeeees 41 C Set the Document Title se an 41 dest Create Named Destination Links sessseseseeeeme 41 z r Create URL Links esten eine Bar Ira 42 Read Input from a Control File uru4 u4H4an nn ann Hann namen ann 42 11 pdbm ununuenunnnnunnanunnanunnanannanannanannanunnanann ana nanannanannanannanannanannanannanannanen 43 LIL Description EU 43 11 2 Functionality and Options zss rHsreran nenne nen nn nenne eee nenne nenne nenne nennen 43 d List Named Destinations u444 nHennn nn anna une n mmm 43 D List Named Destinations Tab separated ursranennan teens nenne 43 0 Redirect the
19. Media Box Crop Box Rotation Functionality and Options C List the CropBox This option lists the crop boxes of the pages comma separated If there are no crop boxes set it returns the media boxes pdpg m in pdf 1 page 0 00 0 00 595 00 842 00 2 page 0 00 0 00 595 00 842 00 3 page 0 00 0 00 595 00 842 00 4 page 0 00 0 00 595 00 842 00 List All Fonts on Pages List all fonts on all pages pdpg f in pdf 1 font TimesNewRomanPSMT font Verdana 2 2 font Verdana Bold 2 font Arial BoldMT PDF Tools AG Premium PDF Technology pAll fAll m P PDF Command Line Suite Version 4 5 November 26 2015 Page 47 of 63 3 font Arial BoldMT Get the Total Number of Pages in a PDF Document The option s generates a shortened output message pdpg pAll in pdf 0 page 4 pdpg pAll s in pdf 4 List all Fonts in a Document The option s generates a shortened output message pdpg fAll in pdf 0 font Verdana 0 font ArialMT 0 font Verdana Bold 0 font TimesNewRomanPSMT pdpg fAll s in pdf Verdana ArialMT Verdana Bold TimesNewRomanPSMT List the MediaBox This option lists the media boxes of the pages comma separated pdpg m in pdf 1 page 0 00 0 00 595 00 842 00 2 page 0 00 0 00 595 00 842 00 3 page 0 00 0 00 595 00 842 00 4 page 0 00 0 00 595 00 842 00 Set the Page Range List all fon
20. Output to a File ernennennennenennennennenn nun nun nun une n nennen nenn 43 oa Page Mode Initial Page Number Open Action zuusenennnnnnnnnnnnnn nenn 43 a Add Bookmarks from an Input File eese 44 n Do not Print Destination Sireen aa mmm 45 n1 Add a Leading Hyphen iernii a N eaa 45 AMA 01 gt E E a E E 46 12 1 Description i iei ee ends ilit e celere pa Pic 9g vd a ANA EA A ANT 46 12 2 Functionality and Options ssssssssssssssseeme menm 46 C List the Cro P BOX escena ev e ire e EEUU ETERNI MERE 46 f List All Fonts on Pages an es stiegen 46 pAll Get the Total Number of Pages in a PDF Document 47 fAl List all Fonts in a Document nesensenennnnennnnnnnnnnn nennen nen nennen nen 47 m List the MediaBoX nn en ae 47 p Setthe Page RANGE eee an cate an eer na irent ah ca eh dd kn uo 47 r List the Page Rotation 2z usss neenannnnnn kitai TAAA mmm en anne 48 S Abbreviate Output sanieren 48 u Disable UserUnit AdjustMent s sssssssssrrssrrrsrrrrurnrrnrnnnnrrnnnreresrnn 48 c MEO ERSREPERREETBPIIBLIDIDTDIIDIDBERBPBICUDILIDIDUIDOHDODDBIODPIT 49 Tosi Descriptionozi eere eee rl LK PEE TER OD RR X o da 49 13 2 Functionality and Option Sisi iaai eee e eee eee eee nenne nenne nenne enne 49 Specify a PDF File Containing the Logo cceceeeee nennen nen nennen nn nn nen 49 Select the logo page eir rr aene xa herr rn x ep E E
21. PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 54 of 63 November 26 2015 16 pdmerge 16 1 Description pdmerge is a tool that can merge several PDF documents into one It also provides the functionality to insert Java scripts for Will Save and Will Print to generate a table of contents and to add outlines bookmarks for each input document 16 2 Functionality and Options Simple Merge of PDF Files The following command merges the documents in1 pdf in2 pdf and in3 pdf to out pdf pdmerge inl pdf in2 pdf in3 pdf out pdf C Create a Table of Contents A table of contents is automatically created when a template file is defined using the option c The template document has two functionalities e The template should contain one page This page acts as template of the created table of contents e The template defines the layout of the table of contents The defining values are set in the custom properties of the PDF document These settings are optional BOTTOMM Margin from bottom Font Two vales that define the font and font size in points PARAN RAGE The distance between two lines in points RIGHTM Margin from left border XYL Three values that define the position of the first entry X position Y position line feed Custom properties can be created in different ways A simple way is using the Document Properties window of Adobe Acrobat see screenshot PDF Tools AG Premium P
22. Page Page Page Page Page Pag ge Page Page Page Page Page Pagg Page Page Page Page Page Page Page Pagi Page Page Page Page Page Page Page Pagi age P Page Page Page Page Page Page Page Page ge Pag Page Page ge Pag Page Page Rage Page Page Page Page Page Rage Page Page Pag Page seis Wf a Bap Mes Pag Page Page Rf Page Page A Page Page Mae rs Page Page P Page Pag Page Page Hage Pada Page Pag age Page Page H ggPagh Page Page Cy Page Page add Page PagfPagepage Page Page Poge fene Page Page n e Papp Page Page A 3 Page Page N age 4 Page Pag Page Page Page Page Page paste Page Page Page Page Page Page P Page Page Page Page Page Pag Page Page Page Page Pege Peg ed T Pa output 16 pdf output 17 pdf Example 2 Page Portrait Logo Rotated Portrait The viewing rotation of the logo is resolved The result is displayed in image 18 pdcat logo logo3 pdf page pdf output18 pdf 18 ge Pal Page Page Page Page Page Aue Pete Page Page Page Page Page EI gag Page Page Page Page Page bI aded Page Page Page tace Page Page Pag e Page Fade ge Page Page Pag page Page Page Page Page Page Rage Bdge Page Page Ange age Page Pas ss Page Pas eap age Page Peg Page Bage Pag l Page Page Page Page Page Pag Ge Page Page Page Page Page Page Page Page Page Page Page Pas MMMM Page Page Poge Page Page Page Page Page Page output 18 pdf Example 3 Page Landscape Logo Portrait If the logo is added wit
23. Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page os Page Page Page Page Page Page Page Page Page Page Page Pag Page Page Page Page Pabe gt Page Page Page Page Pa Page Page Page Page Page Page Page Pag Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page P Page Page Page Page PagegPa Page Page Page Page P edet Page Page Page Page boge Bge OG Se Page Page Page Page PegmPage Page Base Page Page Page Page fea P Page Page Page Page Pe Page Page Pa
24. RE Rr EIEN 49 Put the Logo on top of the Page or in the Background 49 14 txt2pdf eiii ieri oL esi edei duas deed ened sbedicodenscacsardsdcvedseuduessetesieceeses 50 14 1 Description esses Hana edidere rai ze e UNE S tn Dele 50 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 5 of 63 November 26 2015 14 2 Functionality and Options zerserseneenennennennennenn nun nun nun nun nun une n nen nnn nnn 50 ff Setthe font a Ree e EXERCERE HERE KEEN UK ee 51 fs Set the font size a n HEY RR ERR HERA EE OR ERE ER RU 51 pb Setthe page border Size nemine naaa nenn nennen nennen nn nenn 51 ps Set the Page Ssize n en ai an Er A rna Ene ut da eh ehe 51 tw Set the line wrap mode iranienne nienia nenne nennen ernennen nennen nennen nen 51 V Set verbose mode iiie de cred ipae eset ses ere na EIA easton 51 14 3 Error messages and codes ssssssssssssssssessesesemesemene nenne nenne nennen 51 15 os ol ge eer rere ara IR 52 15 t DesclptlOnD rri tu iex I3 EY IR Bike 52 15 2 Functionality and Options seirene aa iaae menm enne 52 ob Base the Cropping on a Specified Box zsnsenennenenn nun nun nun nun n nennen nenn 52 nb Specify the Box Type to Be Set euassenennnnennnnannn namen nen nennen nen 52 shrinkShrink the BOX nl 52 16 pdmerge unuunanunnanunnanunnanunnanannanunnanannanannanannanannanannanannanannanannanannanannanen 54 16 1
25. S willsave script inputl pdf input2 pdf out pdf Where willsave script is an text file containing for example the following script app alert saving the document clears field data this getField NAME value PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 56 of 63 November 26 2015 Use a Control File A control file containing a list of commands can be inserted to the command using the prefix Acommand can contain multiple control files Example with 1 control file containing all commands pdmerge control txt Where the text file control txt could look like this t Chapter 1 input1 pdf t Chapter 2 input2 pdf out pdf Example with 2 control files each containing a list of input files pdmerge owner mypassword listl txt list2 txt out pdf In order to merge all PDF documents in a directory the files should first be listed and written to a file and can then be merged using a control file Here is a sample for the CMD Shell of Windows that merges all files in the folder C pdf C gt dir C pdf pdf B gt list txt C gt pdmerge list txt out pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 57 of 63 November 26 2015 pdinfo pdinfo print Catalog and Info object The following sample prints the Catalog and Info object of the file acrobat pdf pdinfo c acrobat3 reader acrobat pdf
26. Units 1 point 1 72 inch 1 inch 25 4 mm Error codes 0 Successful completion 1 Couldn t open input file 2 Couldn t create output file 3 Option error 13 Unexpected error PDF Tools AG Premium PDF Technology V 14 3 PDF Command Line Suite Version 4 5 Page 51 of 63 November 26 2015 Set the font Use this option to specify the name of the font to be used The default is CourierNew On Windows platforms the selected font must be installed in the system s Fonts directory usually C WINDOWS Fonts On Mac OSX platforms the font must be installed in System Library Fonts or Library Fonts On other UNIX platforms fonts are searched in usr lib X11 fonts Typel Use the environment variable PDFFONTDIR to specify the font directory explicitly Note that the spelling of fonts as shown in the Windows explorer may not always be identical to the way it must be passed to txt2pdf While the Windows font explorer lists msmincho ttf msmincho ttc as MS Mincho it must be passed as MS Mincho to txt2pdf Note 2 txt2pdf caches font information in the file font database dat in the user s temporary folder After installing new fonts or changing the value of PDFFONTDIR you must delete this file in order to have txt2pdf search the font directory again and rebuild the font database Set the font size Use this option to set the font size Default is 11 points Set the page border size Use this option to set
27. age 11 If this is not the case or the rotation is different from 30 degrees other equations apply 1 0 Page Page Page Page Page Page Page Page 11 Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page m Page Page Page Page Pelw bsor Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Pfge Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Faye Page Poe page Page Page lf Pone PogePrge Page Page output10 pdf output11 pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 26 of 63 November 26 2015 Portrait vs Landscape vs Rotated Port
28. age Page Page Page Page Page Page 2 Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page filename page pdf filename logo pdf Width 595 Height 842 Width 595 Height 842 viewing rotation 0 viewing rotation 0 No Transformation Stamping the logo without transformation on top is done using logo without a transformation matrix stamping in the background using bglogo The commands to achieve this are pdcat logo logo pdf page pdf foregound pdf pdcat bglogo logo pdf page pdf backgound
29. bookmarks pdsplit v b 1 1 in pdf Creating xx Chapter A pdf Creating xx Chapter B pdf Exclude low level Bookmarks Use the option m n to exclude bookmarks which have a lower level than n The option m can only be used in combination with the option b The following command splits the input file according to the first and second level bookmarks pdsplit v b m 2 in pdf Creating xx Chapter A pdf Creating xx Page 2 pdf Creating xx Chapter B pdf Creating xx Page 4 pdf The following command splits the input file according to the second level bookmarks PDF Tools AG Premium PDF Technology P X PDF Command Line Suite Version 4 5 Page 33 of 63 November 26 2015 pdsplit b 1 2 m 2 in pdf Creating xx Page 1 pdf Creating xx Page 2 pdf Creating xx Page 3 pdf Creating xx Page 4 pdf Split a Document into Parts with Specified Number of Pages Split the input document and create output documents which are two pages long each pdsplit p 2 in pdf Exchange Bookmark Characters in File Names This option allows to replace characters in bookmark This is useful for bookmarks which contain characters that are not allowed in file names such as or For example to replace all V by a and all by a use a command like this pdsplit x _ in pdf PDF Tools AG Premium PDF Technology 6 1 PDF Command Line Suite Version 4 5 Page 34 of 63 November 26 2015 pdsel Description
30. ce v Volume u Page s rv 0 1CA0 XTRHL T FAC NIIS TEC REA v Expiration T Does not expire J Maintainance Expiration 2033 12 31 2 Uniahte TRA Tmaaa ta ANE SC am netar Chall List all installed license keys The license manager always shows a list of all installed license keys on the left pane of the window This includes licenses of other PDF Tools products The user can choose between e Licenses available for all users Administrator rights are needed for modifications e Licenses available for the current user only Add and delete license keys License keys can be added or deleted with the Add Key and Delete buttons in the toolbar e The Add key button installs the license key into the currently selected list e The Delete button deletes the currently selected license keys PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 9 of 63 November 26 2015 Display the properties of a license If a license is selected in the license list its properties are displayed in the right pane of the window Select between different license keys for a single product More than one license key can be installed for a specific product The checkbox on the left side in the license list marks the currently active license key Command Line License Manager Tool The command line license manager tool icmgr is available in the bin directory for all platforms except Window
31. center TextColor The color of the text The color must be set as PDF command e g E 5 gr PDF Tools AG Premium PDF Technology logo PDF Command Line Suite Version 4 5 Page 18 of 63 November 26 2015 BgColor The color of the rectangle in the background The background color must be set as PDF command e g 0 8 0 8 1 rg Text The actual text an position is defined using the keyword text followed by the two parameter for position and the actual text text X Y Text Where the meaning of the parameters are X The horizontal position O being at the left hand side Y The vertical position O being at the bottom Text The actual text If the text contains blanks this parameter must be in quotes If the text shall contain quotes as part of the text they must be prefixed with a backslash character V Example 1 Create Control File Create a text file with the following content and name it control txt Page 1 comment lines start with a semicolon use the keyword font to set the font name font size alignment text color and background color only the 14 PDF standard fonts are supported if less parameters are specified previous or default values will be in effect font Courier 24 L 0 5 g 0 8 0 8 1 rg use the keyword text to set the x y coordinates and the actual text to be printed optionally a width parameter can be passed to set the width of the rec
32. cepe Landscape Landscape Landscape Landscape andscape Landscape Landscape Landscape Landscape Landscape scape Landscape output 19 pdf output 20 pdf Example 4 Page Landscape Logo Rotated Portrait If the logo is added without transformation matrix the result looks as displayed in image 21 pdcat logo logo3 pdf page2 pdf output21 pdf If the logo should fit on the page it makes most sense to rotate the logo clockwise and move it upwards The corresponding command for the rotation O 1 1000 and translation 10010 595 is given below The result is displayed in image 22 pdcat logo 0 1 1 0 0 595 logo3 pdf page2 pdf output22 pdf 21 scape Landscape Landscape Lar dscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape andscepe Landscape Landscape Larldscape Landscape ndscape Landscepe Lendscape Landscape Landscape Landscape ape Landscape Landscape Larldscape Landscape andscape Landscape Landscape Landscape Landscape Landscape output 21 pdf output 22 pdf Example 5 Page Rotated Portrait Logo Portrait The logo inherits the viewing rotation of the page as shown in image 23 pdcat logo logo pdf page3 pdf output23 pdf 23 Rotated Page Rotated Page Rotated Page R age Rotate age Rotate Page Was Page Pag Rotated Page eis age R dote rose ee 2 Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page output 23 pdf PDF Tools AG Premium PDF Technolog
33. chnology PDF Command Line Suite Version 4 5 Page 41 of 63 November 26 2015 10 pdtoc 10 1 Description pdtoc create a table of content for PDF files 10 2 Functionality and Options b Create or Omit Bookmarks To not generate any bookmarks use the option b pdtoc b inl pdf in2 pdf out pdf I Set New Titles Set or replace titles pdtoc I my first PDF inl pdf I my second PDF in2 pdf out pdf d Place the Current Date on the Pages pdtoc d inl pdf in2 pdf out pdf W Set the Page Width Set the page width to 300 points pdtoc w300 inl pdf in2 pdf out pdf t Place a Header Text on the Pages pdtoc t Table of content inl pdf in2 pdf out pdf C Set the Document Title Set the document title attribute to My Title pdtoc c My Title inl pdf in2 pdf out pdf dest Create Named Destination Links If in pdf has a named destination mydest a link to it can be created like this pdtoc dest mydest in pdf out pdf PDF Tools AG Premium PDF Technology url PDF Command Line Suite Version 4 5 Page 42 of 63 November 26 2015 To replace the title to the named destination link default is document title use the option I pdtoc dest mydest I My Link in pdf out pdf Note that Acrobat 6 0 can only link directly to the correct page number when the linked file is already opened Acrobat 5 0 links correctly in any case Create URL Links pdtoc url http www pdf tools com PDF Tools Homepage out pdf Rea
34. cified Box This option defines based on which box the cropping is done Any type of box can be used the most common and supported are MediaBox CropBox TrimBox BleedBox Artbox nb Specify the Box Type to Be Set This option defines to which box the cropping is applied Any type of box can be used the most common and supported are MediaBox CropBox TrimBox BleedBox Artbox shrinkShrink the Box The shrink value defines the value by which the box is cropped pdcrop ob MediaBox nb CropBox shrink lt left gt lt bottom gt lt right gt lt top gt in pdf out pdf The following example uses the MediaBox as base and sets a CropBox which is 30 points smaller than the MediaBox in all four directions PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 53 of 63 November 26 2015 pdcrop ob MediaBox nb CropBox shrink 30 in pdf out pdf Alternatively the values can be provided as absolute values The following command will shrink the CropBox by 10 points from the left and right border and 20 points from the bottom and top border This is assuming the input page is A4 A4 595 x 842 points pdcrop nb CropBox shrink 10 20 10 20 in pdf out pdf The shrink option can also be used to increase a box this is simply done by providing negative numbers The following command sets the MediaBox 20 points larger in each direction as A4 pdcrop nb MediaBox shrink 20 in pdf out pdf
35. corresponding key word or the significant part thereof as indicated above in parenthesis as part of the option s value pdcat vp Fit Center in pdf out pdf PDF Tools AG Premium PDF Technology 4 3 PDF Command Line Suite Version 4 5 Page 21 of 63 November 26 2015 Common Transformations The following information applies the all types of transformation in particular to the logo functions logo and bglogo In order to scale rotate skew and translate the logo one must apply a transformation matrix A transformation matrix describes a linear transformation from one coordinate system to another For our purpose the transformation matrix contains 6 elements and has the form a b c d e f The elements a b c d are for scaling rotating and skewing the elements e f are vertical and horizontal translation The identity matrix is 1 O O 1 O 0 which means no scaling rotating skewing nor translating is applied Scale Scaling is achieved by multiplying with the matrix sx O O sy O 0 For uniform scaling up or down sx and s must be equal Or put in simpler words The first 4 numbers are multiplied all with the same value A value larger than 1 means scaling up a value smaller than 1 but larger than 0 means scaling down A value of O means the size becomes 0 a value below 0 means it becomes inverted Examples Increase the size to 200 200200 Decrease the size to 50 0 5 0 0 0 5 0 0 Rotate Rotatin
36. d Input from a Control File The option filename allows read data from a control text file Lets assume you have a text file named link txt with the following content I Link to File 1 ini pdf I Link to File 2 in2 pdf The following command will then create a table of content PDF with the two files specified in the control file pdtoc r link txt out pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 43 of 63 November 26 2015 11 pdbm 11 1 Description List bookmarks in a PDF document Add bookmarks from a text file to a PDF document 11 2 Functionality and Options d List Named Destinations pdbm d in pdf D List Named Destinations Tab separated This is the default option Providing no option has the same effect as setting the option D pdbm in pdf Is equal to pdbm D in pdf 0 Redirect the Output to a File This has the same effect as the pipe command gt pdbm o bookmarks txt in pdf 0a Page Mode Initial Page Number Open Action This switch sets the page mode the initially displayed page and the open action for the initial view It must be set before the switch a oa takes three parameters which have the following syntax oa OpenMode PageNumber OpenAction The individual parameters are optional and comma separated OpenMode o Outlines tZ Thumbs f Fullscreen nz None PageNumber Theinitially displayed page number 1 2 3 OpenAction Win
37. d option is explained in this paragraph If the landscape logo is rotated by 90 degrees clockwise around the origin in the lower left corner it needs to be translated upwards by the height of the page otherwise the logo ends up outside below the page The corresponding command for the rotation O 1 1 O 0 0 and translation 1 0 0 1 O 842 is given below The result is displayed in image 17 pdcat logo 0 1 10 0 842 logo2 pdf page pdf outputl17 pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 November 26 2015 Page 28 of 63 16 Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Pege Page Page Page Page Page Page Page 5S Page Page je Pag p d e Pa age ie Pa H 3 hae P age e P be i ge P Page Page Page Page Pege Page Page Page Page Page Page Page Page Page Page Page Page Page Pepe Page Page Page Page Page Page Page Pabd Page Pre Aiba Page Page Pahd Page P Pag Page Page Pa Rage Phde hage Ba Page Page Pa Aage PE Page Page Page Page Pag ege Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page 17
38. dow fit window Width fit width Visible fit visible Example that sets the initial view to bookmarks page 1 and fit window pdbm oa o 1 Window a bookmarks txt in pdf out pdf Example that sets the initial view to full screen page 2 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 44 of 63 November 26 2015 pdbm oa f 2 a bookmarks txt in pdf out pdf Add Bookmarks from an Input File The input file has the same syntax as the output created with the option D Remove the first line Expand State Level Tab Bookmark Title Tab Link CRLF Expand State is the expand state of the bookmark node There are three possible options e The indicates that node should be expanded showing child nodes e The indicates that the node should be collapsed sub node should not be shown e means the node has no children Level is the indent of branch level of the bookmark The value is numeric and zero based Tab is a tab character hex 09 Bookmark is the title of the bookmark Title Link The link type of the bookmark GoTo Page Number A reference to a page number within the document GoToR Page Number A reference to a page number which is in another document CRLF is a carriage return line feed control set hex OdOa The destination such as Fit FitH XYZ etc can only be extracted it cannot be set with pdbm a Create a text fi
39. e 24 of 63 November 26 2015 Scale The origin of any transformation is the lower left corner This also applies to scaling In order to scale down the logo to 50 use the matrix 0 5 0 0 0 5 0 0 pdcat logo 0 5 00 0 5 0 0 logo pdf page pdf output5 pdf With this command the lower left corner of the page and the logo will be at the same location however due to the scaling the upper left corner of the logo is in the middle of the page see image 5 Scale and Translate To translate the logo use the 5 value of the matrix to move it horizontally positive value right and the 6 value to move it vertically positive value upwards The command below scales the image by 0 5 and moves it by 297 5 points to the right 297 5 points w 2 pdcat logo 0 5 00 0 5 297 5 0 logo pdf page pdf output6 pdf The result is shown in image 6 In order to scale down a logo by 50 and center it it needs to be translated by a quarter of its original width to the right and by a quarter of its original height upwards The command for that is pdcat logo 0 5 00 0 5 148 5 210 5 logo pdf page pdf output7 pdf If the pages of the document and the log are different or the scaling is different the values need to be adjusted accordingly 5 Page Page Page Page Page Page Page Page 6 Page Page Page Page Page Page Page Page 7 Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page
40. e nen nn eese mese esee enne 21 PAGE SIZES ek EE 22 Examples for Transformations ccceceeeee eens eee eee eee nn eee enne 23 5 oJ Jo eM EL BEBEFEREUELLTELELTERLTTLRELETETELFELTETELTERTETTCHLLTTTETTERLELERTEFLTELTELRE 31 5 1 Description enr et mere Eme EY t Ro dex ee 31 5 2 Functionality and Options cceceeee eee e eee eee eee eee eee eee eee eee 31 Split Files and name Output Files 4 s4s4 n Hrn nenn nennen nn nn nenne m 31 b Extract all or individual Chapters According to Bookmarks 32 Restrict the Processing to a Specific Bookmark Level 32 m Exclude low level Bookmarks sssssssssssrsssnrrsrrrrurnrnnrrnnnrnnnnrrrenran 32 p Split a Document into Parts with Specified Number of Pages 33 X Exchange Bookmark Characters in File Names 33 6 pdsel unuanunnanunnanannnnunnanunnanunnanannnnannanannanunnanann ana nanannanunnanannanannanannannnn 34 6 1 Description ars ee REED II PR UE IR 34 6 2 Functionality and Options ururansenanennan en mann nn mmn enn 34 Select Individual Pages or Ranges of Pages 4s4 s4snannnnen nennen ann nen 34 a Remove Annotations eaa rare ao aaa nen nun nun nun nun nun nn nnn 34 7 POW BRRISPFRFPERETFTERTLTSTTLBELTELEFERLPEFTERELETELTTELTPTELELTFRTFTEILTLFTEREREOETETELTITPLSTTEFTERTELT 35 ZL DESCAPION er EE D 35 7 2 Functionality and Options eere en enne Rn RR RR ois 35 C B
41. emium PDF Technology 1 1 PDF Command Line Suite Version 4 5 Page 6 of 63 November 26 2015 Overview The Different Tools The Command Line Suite consists of a series of tools to manipulate PDF documents in various ways or extract information The tools are based on the PDF Library SDK The following tools are part of the PDF Command Line Suite pdcat pdw pdxt pdform pdsel pdwebl pdtoc pdsplit pdbm pdpg txt2pdf pdcrop pdinfo pdobj pdis The pdcat tool concatenates merges PDF files The tool can also merge annotations from another PDF file generate book marks add a named destination for each page set the title text of the output file rotate pages add link annotations specified in an ASCII file substitute file names in action links clip and crop pages and more The pdw tool analyses text and prints it along with position and size information You can process this output to generate the hyperlink definitions for pdlink The pdw sample program does not handle the full set of stream operators and neither all fonts The pdxt tool adds a logo taken from a first PDF file and puts it on all pages of a second input PDF file The logo can be put behind or on top of the page content The pdform tool displays information about text form fields or fills in data into form fields The pdsel tool allows to select extract pages from a PDF file The pdwebl tools can add web links URL link annotat
42. enin eee eee ARCANA KERA A TAKET ANRA 9 Select between different license keys for a single product 9 2 3 LicenseKey Storage ivre neun ne man neh x t ex E egre E tenes E EEE 10 WINdOWS wis eta Riemer 10 MacOSX DEED 10 MISI SITU cass eee t Rn mE 10 3 General Options u uunuuunuunnunnunnunnunnunnannunnunnunnunnunnunnunnnnnnunnunnunnunnannunnen 10 CM MEUM 10 3 2 Encrypted files er a Ali 10 pw Decrypt the Input Files esses mmm nnn 11 perm Set Permission Flags cccececeee eect ee eee ee eens teens eens eens nennen nen 11 ownerSet Owner Password uausenennenennnnennnnennnnnn nenn nennen nennen nn nennen 11 user Set User PassW rd au sen en een 11 Ik Set License KEY sisse cong er Ree RE Ee Rea Ebr RE Eia RR REO RET EDO RR EIER 11 3 3 Replace Existing File i iei ect tee aa eer Ren Rer eR Rat ER Ee ae ER ec RR ie 11 4 refer eem EAEE EA ES AEE A EE E M 12 4 1 Description c 12 4 2 Functionality and Options user4srerannennn nenne nenne nenne nennen en nenn nenn nennen 12 Merge docutriehts e ne en Ee ee ARR EE CE Ex EAT AR Ve EYE RA 12 annot Delete Text Annotations z s4srennnnen nenn nennen nun nennen nen nennen nen 12 bglogo Set a Background LOgO euauserennnnennnnennnnen nennen nennen nennen 12 boX Set the Media BOX str na nun neue nnd a 13 bs Border Style of Hyperlinks 4s4 s4sren nenn nenn nennen
43. equired to change the access permissions of the document such as the passwords and the permission flags Set User Password Set the user s password If that password is set the user is prompted a password to open and read the document Specify a user and owner password and access permissions to encrypt the output files pdcat user upw owner opw permit psca in pdf out pdf For the permissions flags see Appendix A Security Set License Key Pass a license key to the application at runtime instead of installing it on the system Replace Existing File The option r is to overwrite an existing file It however will not overwrite looked or read only files pdcat r in pdf out pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 12 of 63 November 26 2015 4 pdcat 4 1 Description The main functionality of pdcat is to concatenate pages from different input documents into one new output document It can also add and replace links reset the media and crop box as well as clip and scale pages or add logos Please note that if a PDF document is provided multiple times as input file the resources such as images or embedded fonts will no longer be shared This can lead to an increase of the file size 4 2 Functionality and Options Merge documents Merge the pages of multiple two ore more PDF input documents into one output document pdcat inl pdf in2 pdf in3 pdf out pdf U
44. font 4 font size 10 and write Hello World into the form pdform in pdf out pdf field02 1 50 50 250 75 4 10 Hello World Delete a field Assuming in pdf contains a form field called fieldO1 pdform in pdf out pdf field01 List all Form Fields pdform lists the name the box coordinates and current data for each field in the file If there are multiple instances of the same field the box of an arbitrary instance is shown pdform 1 formtemplate pdf Fl 177 399 374 51 Data of first field F2 104 399 150 51 Data of second field PDF Tools AG Premium PDF Technology 9 1 PDF Command Line Suite Version 4 5 Page 38 of 63 November 26 2015 pdwebl Description 9 2 The first parameter specifies the input file the second one the output file Subsequent parameters define the key link pair pdwebl will scan the text on all pages for a text fragment containing the key text and will put the corresponding link over the text If a key contains spaces you have to put it into quotes so the shell treats the whole key link expression as one argument pdwebl currently cannot match keys that wrap over the end of a line The default link type for pdwebl is a web link but it supports also other link types These are specified with a prefix in the link specification For a link to another PDF file in the file system GoToR link substitute the prefix http by file To launch any other file or program in
45. g is achieved by multiplying with cos 0 sin 8 sin 8 cos 8 O 0 Where 8 is the angle of the counter clockwise rotation Examples Rotate by 30 degrees 0 866 0 5 0 5 0 866 0 0 Rotate by 45 degrees 0 707 0 707 0 707 0 707 0 0 Rotate by 90 degrees 0 1 1 0 O 0 Rotate by 180 degrees 10 0 1 0 0 Rotate by 270 degrees 0 110 0 0 Skew Specifying an matrix of the form 1 tan a tan 1 O O results in skewing the x axis by angle a and y axis by angle B Due to its rare use this is not described further here Translate Translation is specified by the form 1 O O 1 tx ty where tx represents the translation in points along the x axis and ty represents the translation in points along the y axis 1 PDF point 1 72 inch 1 inch 25 4 mm PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 22 of 63 November 26 2015 Advanced Tip The following information is slightly mathematical and assumes the reader is familiar with matrix multiplication It is not required to understand how to apply transformation it just adds some mathematical background A transformation matrix to transform from one coordinate system to another is represented by a 3 by 3 matrix as shown below abo TM c d0 e f 1 The 3 column does not contain any relevant elements which is why it is left away in the simplified form a b c d e f However it is required to multiply matrices and receive a result whic
46. ge Page Page Pag Page Page Page Page Page age Page Pagi Page Page Page Page Pagg Page Pag Page Pagg Page Page Page Paad Page Page Page PagggPege Page Page Pk Page Pagg Page Pag Pege Page Page Pay ige e Pag Pe Page Page Page fage Page Page Pa Bae Page Page Page Page Page Page Page output8 pdf output9 pdf As one can see part of the logo is outside the page In fact if the rotation angle is larger than 90 or smaller then 90 the entire logo is outside the page A common issue is logos disappearing This often happens due to the initial viewing rotation of the page which may differ from 0 See also chapter Rotated Pages Rotate Scale and Translate Rotating a document as in the sample above image 8 and additionally scaling with 0 5 is achieved by multiplying the two matrices result see image 10 pdcat logo 0 433 0 25 0 25 0 433 0 0 logo pdf page pdf outputl10 pdf In order to translate the rotated logo upwards and to the right so it is placed in the middle of the page one needs to apply some trigonometry Page width w 595 height h 842 The center of the logo needs to be moved x to the right and y upwards where after some calculation one ends up with 4 V3 8 w 1 8 h 63 4 4 V3 8 h 1 8 w 313 1 x y pdcat logo 0 433 0 25 0 25 0 433 63 4 313 1 logo pdf page pdf output11 pdf Again this assumes logo and page have the identical dimensions The result can be seen in im
47. ge Page kona Page Page Page Page Page Page Page Pega Pa e Page Page Page Page Pag e Page Page Page Page Page Page Page Page Page Page Page Page Pe Page Page Page Page Pe Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page ge P dig ege Pa GO P Page Page Page Page P Ped d e e P e Page Page Page Page OD Poe Pags Page Page P Pad Page Page Page Page Page Page Page Page Page Page Page Page Pege Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page output5 pdf output6 pdf output7 pdf Rotate The origin of the rotation is the lower left corner The commands below rotate by 30 and by 30 degrees pdcat logo 0 866 0 5 0 5 0 866 0 0 logo pdf page pdf output8 pdf pdcat logo 0 866 0 5 0 5 0 866 0 0 logo pdf page pdf output9 pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 25 of 63 November 26 2015 8 LER Page Pade Page Page Page Page Page 9 Page Page Page Page Page Page Page Page Page Page Pag amp Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Pa
48. gy PDF Command Line Suite Version 4 5 Page 50 of 63 November 26 2015 14 txt2pdf 14 1 Description As of version 4 2 the txt2pdf tool is replaced by a new implementation that supports not only ASCII input but also UTF 8 and Unicode as well as the use of arbitrary fonts The old version of txt2pdf is deprecated and will be shipped as oldtxt2pdf for a limited period of time 14 2 Functionality and Options The basic usage of txt2pdf is to call it with the input and output file names txt2pdf input txt output pdf The input text file may contain certain control characters with formatting effects e Tab advance the start of the next character to the next tab position which is a multiple of 8 space characters per column e Form feed start a new page e Byte order marker Unicode and UTF 8 text files should contain the appropriate byt order marker at the beginning of the file If this byte order marker is missing txt2pdf tries to guess the encoding prior to attempt to process it as ASCII The txt2pdf tool supports a number of options as listed by the usage text when called without any parameters txt2pdf txt2pdf exe options in txt out pdf options ff font Font name default CourierNew fs size Font size default 11 pb border Page border in points default 20 ps width height Page width and height in points default 595 842 tw wrap Set line wrap mode 0 off 1 on default 1 V Verbose mode
49. h is a 3 by 3 matrix again In order to combine multiple operations e g rotating and scaling the corresponding matrices are multiplied Example Matrix R to rotate by 90 degree matrix S to scale by factor 2 010 2 0 0 R 1 0 0 s 0 2 0 001 0 0 1 The transformation matrix that does both rotate and scale is TM Rx S which in the simplified version is O 2 2 0 O 0 To gain a deeper knowledge about coordinate transformation please refer to the PDF Reference chapter 4 2 Page Sizes When dealing with transformation matrices specially with translation it is a requirement to know how large the pages are The coordinate system of a PDF page is in points 1 point corresponds to 1 72 inch 1 inch is equal to 25 4mm Below is a table with the most frequently used paper sizes and their size in PDF points Name Size PDF Points A3 297 x 420 mm 842 x 1190 A4 210 x 297 mm 595 x 842 Letter 8 5 x 11 inch 612 x 792 Legal 8 5 x 14 inch 612 x 1008 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 23 of 63 November 26 2015 Examples for Transformations The following commands show how to use the logo and bglogo switches and how the corresponding results look Let s assume you have a PDF document with a page of size A4 and a PDF logo document with the same dimensions A4 width w 595 points height h 842 points These two documents are displayed below image 1 and 2 1 Page P
50. hout transformation matrix the result looks as displayed in image 19 pdcat logo logo pdf page2 pdf outputl19 pdf If the logo should fit on the page there are the following options e Shrink the logo and translate it to the middle of the page e Rotate the logo clockwise and move it upwards e Rotate the logo counter clockwise and move it to the right The third option is explained in this paragraph If the portrait logo is rotated by 90 degrees counter clockwise around the origin in the lower left corner it needs to be translated to the right by the width of the page otherwise the logo ends up outside to the left the page The corresponding command for the rotation O 1 1 O 0 0 and translation 1 0 O 1 842 0 is given below The result is displayed in image 20 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 29 of 63 November 26 2015 pdcat logo 0 1 1 0 842 0 logo pdf page2 pdf output20 pdf 1 9 PP Landpomm Lapgerape M scape Landscape 20 andscape Landscape Landscape Landscape Landscape Landscape P kiscape Landscape andscape Landscape Landscape Landscape Landscape Landscape scape Landscape and and jw VA ndscape Lands dscape Larki 2 ds d endscape Landscape Landscape Landscape Lard nda Radsebpe Landschgg andscape Landscape Land scape Lard 2 Idscape Land a b H scope Lendschpe 2 La 2 idscap Lang m ndscape Landscape Landscape Landscape Landscape Land ndscape Lands
51. ions to a PDF file The pdtoc tool creates a PDF file containing links to existing PDF files It can also add URL links and links to named destinations This tool splits a PDF file into single page files changing links between pages into links between the spited files This tool lists bookmarks contained in a PDF file This tool lists basic information about a PDF file such as number of pages fonts MediaBox CropBox etc The txt2pdf tool creates PDF files from ASCII text This tool can be used to crop PDF files The pdinfo tool lists the info object of a PDF file The pdobj tool lists individual objects of the PDF file The pdls tool lists all pages objects of a PDF file and optionally their contents streams These tools are specialized tools which require profound knowledge about PDF technology PDF Tools AG Premium PDF Technology 1 2 PDF Command Line Suite Version 4 5 Page 7 of 63 November 26 2015 Using the Tools Each tool prints a short text on how to use it to standard output when executed without parameters This text consists of the usage and a list of the available parameters The command line syntax is Unix like Command line arguments in brackets are optional Arguments in curly brackets can be repeated The tools have a usage to provide a brief description of all available features To retrieve the usage they the tool name without any arguments This documentation
52. le with the following content There must be a Tab before and after the bookmark title 0 Part 1 GoTo 0 FitH 844 1 First Page GoTo 0 FitH 844 1 Second Page GoTo 1 FitH 839 2 Bookmarkl GoTo 1 FitH 700 3 Bookmark2 GoTo 1 FitH 505 3 Bookmark3 GoTo 1 FitH 341 0 Part 2 GoTo 2 FitH 843 1 Bookmark4 GoTo 2 FitH 676 pdbm a bookmarks txt in pdf out pdf PDF Tools AG Premium PDF Technology n PDF Command Line Suite Version 4 5 Page 45 of 63 November 26 2015 Do not Print Destinations This option only lists the titles and not the destinations pdbm n in pdf Add a Leading Hyphen This option is equal to the option n but adds a leading hyphen for compatibility reasons with older versions pdbm n1 in pdf PDF Tools AG Premium PDF Technology 12 12 1 PDF Command Line Suite Version 4 5 Page 46 of 63 November 26 2015 pdpg Description 12 2 pdpg can be used to list The total number of pages in a PDF document The size of the media and crop box The viewing rotation of the pages The fonts per page or per document The output of pdpg has the following format pagenumber type values1 value2 value3 pagenumber The page number in the document At document level this value is O type The type can be page or font valueX A row of type font has always one value the name of the font A row of type page can have several values e g
53. mpose the arguments just as they would be specified on the command line for the PDCAT executable but without the restriction of the maximum length imposed by the command shell obj AddParameter r obj AddParameter input pdf obj AddParameter output pdf Execution The command is executed by calling the method Execute Dim res As PDErrorType osErr As Long res obj Execute If res pdOSErr Then osErr obj GetErrorCode The Execute method returns a result code as defined in the IDL file and the PDApp h file If an error is returned from the operating system the corresponding error number can be retrieved using the GetErrorCode method This typically happens when there is a problem with file input output The class pdsplit works in the same way PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 62 of 63 November 26 2015 Appendix A Security Encrypting a PDF file is useful in combination with permission flags that define what actions the user may or may not perform A document must have an owner password in order to set permission flags A user password is not related to permission flags but only required to open the document Here is a list of the permission flags p c Changing the document is denied in Acrobat s Selection and copying of text and graphics is denied Do not print the document from Acrobat a Adding or changing annotations or form fields
54. ndscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape endscape Landscape Landscape Landscape Landscape Landscape andscape Landscape Landscape Landscape Landscape Landscape LANDSCAPE LOGO filename page2 pdf filename logo2 pdf Width 842 Height 595 Width 842 Height 595 viewing rotation 0 viewing rotation 0 14 Rotated Page Rotated Page Rotated Page 15 Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page filename page3 pdf filename logo3 pdf Width 595 Height 842 Width 595 Height 842 viewing rotation 90 viewing rotation 90 Example 1 Page Portrait Logo Landscape If the logo is applied without a transformation matrix the result looks as displayed in image 16 pdcat logo logo2 pdf page pdf outputl6 pdf If the logo should fit on the page there are the following options e Shrink the logo and translate it to the middle of the page e Rotate the logo clockwise and move it upwards e Rotate the logo counter clockwise and move it to the right The secon
55. nennen nn nennen 13 C Set the Document Information zsr sserennnnennn nn nennen nennen 13 clip Clip Pagesdni ee eer ete e rh EIER 13 crop Set the Crop BOX un serico sat esed anlagen 13 I Create Bookmarks for each Input File esses 14 Use a Control File en rem te ema rne RE race ver 14 Create Link Annotations uscire ree ox aa E Beeb eua d bul puse LAE Cie nS eleg 14 Create Bookmarks with Links essssesssseeem mme 16 Create a Free Text Annotation usessersensennennnnnnnnunnannannan nun nun nun nnn 17 logo Add Logos from a PDF Document uzssrensenennnnannnnnn nenn nennen nen 18 m Add Named Destinations for each Page 2z4sreran nenne nenne nenn 19 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 3 of 63 November 26 2015 M Set Metadata near near 19 oT Set PAGE MOde ru 2 2 reisen 19 p Copy a Specified Range of Pages 24 uHHranenanenn anne nan een 19 pl SEE PaAgeibayouk nenn ne ne Ur ELE ne 19 R Rotate Pages ues noci ee at 19 S Substitute Text Strings in Action Links eeseseeseseeeeese 20 Sp Substitute a Substring in Action Links seeseseeseseeeesee 20 UC Un embed File Collection ssssssrssssrrssrrrsrrrrsrrrrnrnnuurnnnnrnnnnrnnenran 20 vp Set Viewer Preferences eec peer Be 20 4 3 Common Transformations ersesersnnennnnennnnennn nenn
56. on 4 5 Page 59 of 63 November 26 2015 pdis pdls prints the pages tree and content streams of PDF documents For example pdis s c acrobat3 reader acrobat pdf Info object 276 CreationDate D 19960913110306 Producer Acrobat Distiller 3 0 for Macintosh Author Adobe Systems Incorporated Creator PageMaker 6 0 Title Why To Buy ModDate D 19961023133930 Subject Why to Buy Adobe Acrobat 3 0 Keywords Adobe Acrobat 3 0 page 1 is object 281 Font F6 NKAAAF NuevaMM It 540 200 Font F9 NKBDBI NuevaMM 200 200 Font F11 MyriadMM 400 600 Font F12 MyriadMM 700 600 00 612 792 RC GS1 gs q 0 530 05 402 5 0 103 4999 661 3 cm Iml Do Q BT F6 1 Tf rest omitted With the option o output txt the output can be redirected to a specified file PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 60 of 63 November 26 2015 20 COM Interface 20 1 Overview There is a COM interface available which acts as a wrapper to the two command line tools pdcat exe and pdsplit exe The COM interface is named pdapp dil it is a Windows COM DLL It can be used with any programming language that supports COM such as Visual Basic or Delphi The COM interface does not support any kind of encryption opposed to the executables pdcat exe and pdsplit exe The COM interface used to be sold as a stand alone product called PDCAT COM DLL This product
57. points to the top Add the logo only to page 2 of in pdf pdcat 10go 2 2 0 25 00 0 25 200 300 logo pdf in pdf out pdf User s Tip See also chapter Common Transformations Set the Media Box The media box marks the size of the page Set the media box to a square of 300x300 points at x 100 y 250 pdcat box 100 250 400 550 in pdf out pdf User s Tip The media box defines the size of the page If it s changed it has no impact on any objects on the page This means resetting the media box does not automatically delete objects outside the media box It therefore does not reduce the file size nor should be used to hide any confidential information since it could simply be reset again Border Style of Hyperlinks Set the set border style for hyperlinks added via switch I See chapter Border Style to find out more about border styles pdcat bs 33009 in pdf out pdf Set the Document Information Set document title attribute to New Title pdcat c New Title in pdf out pdf Set author attribute to Peter Pan pdcat c Author Peter Pan in pdf out pdf Clip Pages Set a clipping area of the square 500 x 500 points with 0 0 at lower left corner to the out pdf pdcat clip O 0 500 500 in pdf out pdf Set the Crop Box The crop box marks the size of the part that is to be displayed pdcat crop 100 250 400 550 in pdf out pdf If the size of the crop box is increased the media box should be taken in
58. r which can do some on the fly processing while serving the desired PDF page pdsplit big pdf http myweb servlet big page d big d pdf It is also possible to change links to relative web links pdsplit big pdf http big page d big d pdf or pdsplit big pdf http servlet big page 3d big d pdf PDF Tools AG Premium PDF Technology m PDF Command Line Suite Version 4 5 Page 32 of 63 November 26 2015 Extract all or individual Chapters According to Bookmarks Extract the chapter Chapter One if it exists in the file in pdf according to bookmarks pdsplit v b Chapter One in pdf Creating xx Chapter One pdf In order to extract by bookmarks and not create a prefix define an output file and name it s pdf pdsplit v b Chapter One in pdf s pdf Creating Chapter One pdf If the file big pdf contains a bookmark tree pointing to the individual chapters of the file pdsplit will extract all sections into separate files The name of the files being created will carry the prefix chapter followed by the bookmark text and have the extension pdf in the example below pdsplit b big pdf chapter s pdf Restrict the Processing to a Specific Bookmark Level The option I can only be used in combination with the option b Assume you have a bookmark tree that looks as this Chapter A Page 1 Page 2 Chapter B Page 3 Page 4 The following command splits the input file according to the first level
59. rait Every page in a PDF document can have a so called viewing rotation The viewing rotation can take the following values O 90 180 270 It defines how the page is to be displayed when viewed in a PDF viewing application In this chapter we treat three types of pages These are e Portrait The width of the page is smaller than its height The viewing rotation is 0 e Landscape The width of the page is larger than its height The viewing rotation is O e Rotated Portrait The width of the page is smaller than its height The viewing rotation is 90 As a result the page appears as landscape The most common example of a rotated portrait is using the PDFMaker 7 0 plug in for MS Word and convert a landscape MS Word document to a PDF document There exist many more types such as rotated landscape or other viewing rotations e g 270 Those cases occur infrequently and are not discussed here The rotation and page sizes of documents can be retrieved using the command line tool pdpg When one deals with rotated pages one needs to be aware how rotated pages are handled The steps always are as follows e The viewing rotation of the PDF page and the logo are set to O e The logo is added to the page e The viewing rotation is set back to the initial rotation of the page There are nine different combinations of a logo added onto a page Three of them are trivial i e when the page and the logo are of the same type The other
60. reak down Text Blocks to Individual Character 35 cr Add Carriage Return before New Lines zsssessennnnnnnnnnnnnn nennen nennen 35 0 List the Annotations in a Separate File sese 35 r Take Account of the Page Rotation s ssssssrrsssrrssrrresrrnrsrrnrerrrnns 35 u List the Text in Unicode Encoding eeseeseeeeeneeme 35 W Break down Text Blocks to Blank Separated Words 35 8 Pdform uunuunanunnnnunnanunnanunnanunnanunnanunnanunnanunnanannanunnanunnanannanunnanunnannnnannnn 37 8 1 0 DESERIBEION an ee en een En NL achte 37 8 2 Functionality and Options userHsrernnnennn nen nn nenne nenne nenne nenne nenne enne 37 Fillip data ssc dete a ae ee eee ea ee Sek 37 Add amnewrformitfield une seen cett doe ire mark 37 Delete afield pec RI In Trier 37 ast all Form Fields vir fv coke iia 2A 37 9 POW I II 38 9 1 Descriptio ocio tacos tye te tie acetate duane tte a ta nette E XE KR TE aaa 38 9 2 Functionality and Options szernenseneenennennennennnnn nennen nenne nun nun nnn nnn 38 Add URL Links to a PDF Document zrersnrernnnennnnennn nenn nenne nenne nennen 38 Add Page links to a PDF Document nuserersenennnnennnnnnnnnennn nenne nenne nennen 38 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 4 of 63 November 26 2015 Addi Java Scripts anna EHRE DRIN 38 i Read Input
61. s A complete description of all commands and options can be obtained by running the program without parameters licmgr List all installed license keys licmgr list The currently active license for a specific product is marked with a star on the left side Add and delete license keys Install new license key licmgr store X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX Delete old license key licmgr delete X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX Both commands have the optional argument m that defines the scope of the action e B For all users e Current user Select between different license keys for a single product licmgr select X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX PDF Tools AG Premium PDF Technology 2 3 PDF Command Line Suite Version 4 5 Page 10 of 63 November 26 2015 License Key Storage Depending on the platform the license management system uses different stores for the license keys Windows The license keys are stored in the registry e HKLM Software PDF Tools AG for all users e HKCU Software PDF Tools AG for the current user Mac OS X The license keys are stored in the file system e Library Application Support PDF Tools AG for all users e Library Application Support PDF Tools AG for the current user Unix Linux The license keys are stored in the file system e etc opt pdf tools for all users e pdf tools for the current user Note The user group and permis
62. ser s Tip One should try and avoid using the same input document multiple times The main reason is that resources such as embedded fonts and images are embedded from every input file Hence if the same resource is used on two different pages of the same input document and these two pages are merged using the same input file twice the resource is embedded twice For page re assembly of the same input document use the tool pdsel instead annot Delete Text Annotations Do not copy any text annotations to the output file pdcat annot in pdf out pdf bglogo Set a Background Logo Use ogo pdf as background logo in pdf as input and create a new output document with the logo called out pdf In the background means behind the content of the page pdcat bglogo 1 1 logo pdf in pdf out pdf User s Tip If the page contains opaque items such as non transparent images or vector graphics a logo in the background might remain partially or fully hidden behind these objects In this situation use the switch logo to put the logo in the foreground Add a logo with its size reduced to 50 The coordinates of the lower left corner of the logo remain the same pdcat logo 0 5 00 0 5 0 0 logo pdf in pdf out pdf PDF Tools AG Premium PDF Technology box C clip crop PDF Command Line Suite Version 4 5 Page 13 of 63 November 26 2015 Add a logo with its size reduced to 25 and move it 200 points to the right and 300
63. sions of those directories are set explicitly by the license manager tool It may be necessary to change permissions to make the licenses readable for all users Example chmod R go rx etc opt pdf tools 3 General Options 3 1 Usage The usage will be listed by typing a command without parameters 3 2 Encrypted files Encrypted input files that have a user password can be read with most tools if either the user or owner password is provided A PDF document can have two passwords The owner password and a user password The owner password is to protect the document from unwanted changes or actions taken There are several security flags which can be set for this purpose see Appendix PDF Tools AG Premium PDF Technology perm PDF Command Line Suite Version 4 5 Page 11 of 63 November 26 2015 A Security When a PDF document is encrypted with a user password the content of the document can only be read opened when the user password is known Most but not all tools of the PDF Command Line Suite support the following encryption related options Decrypt the Input Files Specify either the user or the owner password to read an encrypted PDF input document pdcat pw PW1 inl pdf pw PW2 in2 pdf out pdf Set Permission Flags Set the access permission flags See also Appendix Security for additional information ownerSet Owner Password user 3 3 Set the owner s password That s the password r
64. six are explained in the following samples Page Portrait Landscape Rotated Portrait Portrait trivial Example 3 Example 5 Landscape Example 1 trivial Example 6 Rotated Portrait Logo Example 2 Example 4 trivial The six samples handle the non trivial combinations of the three different pages and three different logos These six input documents are displayed in images 1 2 12 13 14 and 15 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 27 of 63 November 26 2015 1 2 andscape Landscape Landscape Landscape Landscape Landscape 1 3 ndscape Landscape Landscape Landscape Landscape Landscape andscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape endscape Landscape Landscape Landscape Landscape Landscape andscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape endscape Landscepe Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape andscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape endscape Landscape Landscape Landscape Landscape Landscape ndscape Landscape Landscape Landscape Landscape Landscape endscape Landscape Landscape Landscape Landscape Landscape a
65. tangle default 0 adjust width to text width text 10 700 this is a piece of text with a M inside font Courier 12 C enter text 300 600 centered 80 2 Add the Free Text Annotation Add the textbox using the following command pdcat r Il 1 control txt in pdf out pdf Add Logos from a PDF Document Add a logo to the foreground of every page of in pdf pdcat logo logo pdf in pdf out pdf User s Tip See also chapter Common Transformations and switch bglogo PDF Tools AG Premium PDF Technology m p PDF Command Line Suite Version 4 5 Page 19 of 63 November 26 2015 Add Named Destinations for each Page A named destination for each of a document can be set using mPre where Pre is the name of the prefix The following example sets the named destinations FirstBook1 on page 1 FirstBook2 on page 2 etc pdcat mFirstBook in pdf out pdf Set Metadata Set document Metadata from a XML file If the parameter none is passed no meta data is added pdcat M meta xml in pdf out pdf Set Page Mode oT show thumb nails 00 show outlines bookmarks oP page only oF full screen oC show layers Copy a Specified Range of Pages Copy pages range 1 through 3 pdcat p 1 3 in pdf out pdf Copy page 1 from first file and pages 3 to 4 from second file pdcat p 1 1 inl pdf p 3 4 in2 pdf out pdf Set Page Layout The pl option takes one of the following val
66. te the command below pdwebl inl pdf out pdf l pairs txt This has the same effect as the following command with text file pdwebl inl pdf out pdf PDF Tools http www pdf tools com google http www google com Note use a tab in the control file instead of the equal sign to delimit a match text that contains an equal sign Example E mc2 http en wikipedia org wiki E 3Dmc2 Example using Standard Input If no file name parameter is provided with the switch I the input is read from the standard input One line corresponds to one key link pair Completing the input is achieved by pressing Ctrl Z twice pdwebl inl pdf out pdf 1 PDF Tools http www pdf tools com google http www google com AZ Z Alternatively the key link pairs can be piped This is achieved using the following command echo PDF Tools http www pdf tools com amp amp echo google http www google com pdwebl inl pdf out pdf 1 Quite Mode Omit the log to standard out pdwebl q inl pdf out pdf PDF Tools http www pdf tools com Set the border style of links 0 black solid 1 red dashed PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 40 of 63 November 26 2015 solid red green dashed solid green blue dashed solid blue Set the border to solid blue nu AB WN pdwebl s6 in pdf out pdf PDF Tools http www pdf tools com PDF Tools AG Premium PDF Te
67. the size of the page border default 20 Set the page size Use this option with two values to set the width and height of the pages in points default 595 842 for A4 Set the line wrap mode Use a value of 0 to disable automatic line wrapping of long lines default 1 Set verbose mode Print verbose log messages Error messages and codes The txt2pdf tool returns with an error code of 0 on successful completion Other error codes are PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 52 of 63 November 26 2015 1 Couldn t open input file Verify that the input file exists and can be opened for read 2 Couldn t create output file Verify that the specified folder can be written to Also make sure that a font with the specified name or CourierNew exists in the font folder see description for option ff 3 Option error Verify the spelling and permitted values of the options on the command line 13 Unexpected error An internal error of the tool was encountered You may want to contact PDF Tools support if you cannot resolve the problem 15 pdcrop 15 1 Desciption As the name says pdcrop crops pages in PDF documents It can set various boxes such as the media box the crop box the bleed box the art box and the trim box New vales can be based on existing values of any existing box 15 2 Functionality and Options ob Base the Cropping on a Spe
68. ts on page 2 3 pdpg f p 2 2 in pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 48 of 63 November 26 2015 2 font Verdana 2 font Verdana Bold 2 font Arial BoldMT 3 font Arial BoldMT List the Page Rotation Option m lists the media box Option c the crop box and option r the rotation pdpg m r in pdf 1 page 0 2 page 0 3 page 0 4 page 90 Abbreviate Output Do not output the result with additional information comma separated See options pAll and fAll for samples Disable UserUnit Adjustment Disable the adjustment of box sizes by UserUnit PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 49 of 63 November 26 2015 13 pdxt 13 1 Description The pdxt tool adds a logo taken from a first PDF file and puts it on all pages of a second input PDF file The logo can be put behind or on top of the page content This functionality is also available in pdcat pdxt can only be applied once per document It is generally suggested to use pdcat instead 13 2 Functionality and Options Specify a PDF File Containing the Logo pdxt logo pdf in pdf out pdf Select the logo page Take page 3 of logoin pdf as logo pdxt 3 logoin pdf in pdf out pdf Put the Logo on top of the Page or in the Background Put the logo in the foreground pdxt logoin pdf in pdf top out pdf PDF Tools AG Premium PDF Technolo
69. ues SinglePage OneColumn TwoColumnLeft TwoColumnRight TwoPageLeft TwoPageRight pdcat pl TwoPageRight in pdf out pdf Rotate Pages Rotate the pages by 90 degree clockwise pdcat R 90 in pdf out pdf Rotate the pages of the first file by 90 degree clockwise don t rotate the pages of the second file pdcat R 90 inl pdf R 0 in2 pdf out pdf PDF Tools AG Premium PDF Technology S PDF Command Line Suite Version 4 5 Page 20 of 63 November 26 2015 Substitute Text Strings in Action Links If in pdf contains for a web link like http www google com the link can be replaced like this pdcat s http www google com http www yahoo com in pdf out pdf Please note this option replaces only the web link If the link is related to a textual string in the content of the PDF document this string will remain as is Substitute a Substring in Action Links The parameter sp is similar to s but can be used to replace substrings The following example replaces all sub strings tools by fools pdcat sp tools fools in pdf out pdf Un embed File Collection This switch is used for un embedding of attached files in a collection Set Viewer Preferences This option permits the setting of the following viewer preferences e HideToolbar Tool e HideMenubar Menu e HideWindowUI UI e FitWindow Fit e CenterWindow Center e DisplayDocTitle Title Any of these preferences can be activated by listing the
70. wer corner of the annotation rectangle height Height of the annotation rectangle width Width of the annotation rectangle Path Path and filename of the file to which the link points A relative path is also possible pagenr Page number of the linked file to be opened x offset x position on the page of the linked PDF file that has to be places at the upper left corner of the viewing application y offset y position on the page of the linked PDF file that has to be places at the upper left corner of the viewing application URL The URL to where the link annotation points Note that in PDF the origin of the coordinate system is in the lower left of the page Example 1 Create a Link Annotation to another Page Step 1 Create Control File Create a control text file name it ink tmp add the following four lines Page 1 PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 16 of 63 November 26 2015 bs 33009 replace the target pdf by an existing PDF document 100 100 200 200 target pdf 2 100 150 The above control files does the following e Add a link annotation on page 1 e The annotation has a dashed red border e Its position is 100 from the left and 100 points from the bottom 100 points 1 39 inch 35 3 mm e tis 200 points wide and high e It points to the second page of the document target pdf and on that page to offset 100 points from the left and
71. y PDF Command Line Suite Version 4 5 Page 30 of 63 November 26 2015 Example 6 Page Rotated Portrait Logo Landscape If the logo is added without transformation matrix the result looks as displayed in image 24 pdcat logo logo pdf page3 pdf output24 pdf First off one needs to be aware where the origin is Due to the rotation of the page the origin in the image appears in the upper left The logo must be rotated counter clockwise and moved to the right Not downwards remember the page is rotated The corresponding command for the rotation O 1 1 O 0 0 and translation 1 O O 1 595 0 is given below The result is displayed in image 25 pdcat logo 0 1 1 0 595 0 logo pdf page3 pdf output25 pdf 24 Rotated Page Rotate otated Page 25 Rotated Page Page ini DE uei Puce Rotated mune Rotated RE Rotated Page Rotated Page Rotated Page Rotated Page Rotated Rot ted otated Rotated R ad Page Rotated R 9 Sd Rage Rotated Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page Rotated Page page Rotated Page Page Ro ated Page Pag Rotated Page output 24 pdf output 25 pdf PDF Tools AG Premium PDF Technology PDF Command Line Suite Version 4 5 Page 31 of 63 November 26 2015 5 pdsplit 5 1 Description The pdsplit program splits large PDF files into smaller pieces either one page files or according to the bookmarks stored in the

Download Pdf Manuals

image

Related Search

Related Contents

Relatório e Monografia - Filipa Fonseca  Opm. NEW E300 SP  BTCITY 取扱説明書 - MIDLAND(ミッドランド)  PDFファイル  AEMC Model 6550 Megohmmeter Manual PDF  AVIATION RESCUE SWIMMER DRY SUIT AIR  RobinAir VacuMaster 15510 User's Manual  Troubleshooting web sessions with CUSUM    取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file