Introduction

This appendix describes the apgetinfo command syntax and summarizes the options you can use with the apgetinfo command.

Command Syntax

apgetinfo [options] inPDFFile1 [inPDFFile2 ...]

Product Information Options

The following table describes options you can use to obtain information about the APGetInfo product. For more information about these options, see Getting Started with APGetInfo.

Option Function Description Example
-v Show version information Displays the version of APGetInfo you are running. This is important when corresponding with support@Appligent.com. In order to best understand your problem, we must know what version of the software you have. apgetinfo -v
-h or
-help
Show help Displays all available command-line options, plus version information. apgetinfo -h
apgetinfo -help

Document Information Options

The following table describes the options you can use to retrieve basic information about PDF documents. For more information about these options, see Getting Document Information.

Option Function Description Example
-summary Display summary information (default) Displays summary information about a PDF document, including document description information, bookmark information, annotation information, and font information. apgetinfo -summary
path\input.pdf
-info Display document Information Dictionary Displays document description information contained in the document information dictionary. (This is equivalent to the Acrobat Document Properties feature.) It includes data that identifies the file, such as its title, author, creation date, size, and PDF version number. apgetinfo -info
path\input.pdf
-font Display font information Displays information about the fonts used and embedded in the document. apgetinfo -font
path\input.pdf

Page Size Information Option

The following table describes the option for retrieving page size information. For more information about this option, see Getting Page Size Information.

Option Function Description Example
-pagesize Display size of all pages Displays the MediaBox coordinates, CropBox coordinates, and degree of rotation for each page in the document. The MediaBox is the full page. The CropBox is the working space within the margins. apgetinfo -pagesize
path\input.pdf

Bookmark Information Options

The following table describes the options you can use to retrieve bookmark information. For more information about these options, see Getting Bookmark Information.

Option Function Description Example
-bookmark Display bookmark information Lists all document bookmarks, numbered and indented according to level. apgetinfo -bookmark
path\input.pdf
-page Output to include page numbers; requires -bookmark option Displays the page number of each bookmark. apgetinfo -bookmark
-page path\input.pdf
-path Output to include full bookmark path; requires -bookmark option Displays the full document path for each bookmark, beginning with the document title, with levels separated by a vertical bar. apgetinfo -bookmark
-path path\input.pdf
-nolevel Output to not include indent level; requires -bookmark option Displays bookmarks without any indication of level. apgetinfo -bookmark
-nolevel path\input.pdf
-dest Output to include named destinations, if they exist; requires -bookmark option and -page option Includes any named bookmark destinations. These are links to specific locations in the current or other documents. They can be user defined or generated automatically by PDF creation software. apgetinfo -bookmark
-page -dest
path\input.pdf
-count Output to include total number of bookmarks in the document; requires -bookmark option Displays the total number of bookmarks in the document. apgetinfo -bookmark
-count path\input.pdf

Annotation Information Options

The following table describes the options for retrieving annotation information. For more information about these options, see Getting Annotation Information.

Option Function Description Example
-annot Display annotation information Displays information about annotations, such as notes, text, audio, stamps, form fields (widgets), files, pencil marks, rectangles, ellipses, lines, highlights, strike outs (crossthroughs), and underlines. apgetinfo -annot
path\input.pdf
-color Output to include annotation color information; requires -annot option Displays the color of annotations as RGB values to six decimal places. apgetinfo -annot
-color path\input.pdf
-popup Output to include popup annotation information; requires -annot option Reports the existence of an annotation pop-up. The pop-up is listed directly after the annotation it is associated with, but the text is listed with the annotation, not the pop-up. apgetinfo -annot
-popup path\input.pdf
-rect Output to include annotation rectangle; requires -annot option Indicates the location and size of the annotation rectangle by describing its coordinates, in points, with reference to the bottom left of the cropped page. For example: apgetinfo -annot
-rect path\input.pdf
-link Output to include link annotations; requires -annot option Displays information about document links. apgetinfo -annot
-link path\input.pdf

Form Field Information Option

The following table describes the option for retrieving form field information. For more information about this option, see Getting Form Field Information.

Option Function Description Example
-formfield Display form field information Displays information about form fields, including field name, field type, and field value. Form fields include text boxes, multiline text boxes, check boxes, combo boxes, list boxes, buttons, radio buttons, and signatures. apgetinfo -formfield
path\input.pdf

Metadata Option

The following table describes the option for retrieving XML metadata. For more information about this option, see Exporting XML Metadata.

Option Function Description Example
-metadata Display metadata Exports XML metadata from a PDF file saved or created in Acrobat 5.0 or above. The metadata is specified in XMP, Adobe’s eXtensible Metadata Platform. XMP, is based on RDF (Resource Description Framework), a standard model for supplying metadata. There are two schemas associated with XMP: PDF and XAP. This option displays metadata in both formats. apgetinfo -metadata
path\input.pdf

Input and Output Options

The following table describes the options for managing file input and output. For more information about these options, see Managing Input and Output.

Option Function Description Example
-d User password to open this document The password required to open a PDF document encrypted with a User password. Secured PDF files can have two types of passwords: User passwords and Owner passwords. (A User password is also known as an Open password, because it is used to open documents.) If your document is encrypted with a User password, you must supply it immediately following the -d option. (Owner passwords do not work with APGetInfo.) apgetinfo -d password
[options] path\input.pdf
-name Include file’s name in output Places the name of the file being processed in the output. This is especially useful when you run multiple commands or include
multiple input files on a command.
apgetinfo -name
[options] path\input.pdf
-n Do not write information to screen This option will suppress information from being written to STDOUT. apgetinfo -n
[options] path\input.pdf
-cmds Path to the file of commands Process multiple commands quickly and efficiently in one run. For more information on the -cmds option, see Command Collections. apgetinfo -cmds File.txt
-o Output filename Specifies an output file. The path and name of the output file must immediately follow the -o option. If you want your output file to go to a particular directory, be sure it exists beforehand. APGetInfo will not create a new directory. apgetinfo -o
path\output.txt
[options] path\input.pdf

Reporting Options

The following table describes the options for reporting progress and error messages. These options are helpful for debugging and understanding how APGetInfo works. For more information about these options, see Reporting Progress and Errors.

Option Function Description Example
-p Provide progress messages Write progress messages and/or errors to STDOUT apgetinfo -p
[options] path\input.pdf
-l Write progress to the given log file name Saves the progress and error messages to a user-specified text file instead of the default log file, apgetinfo.log. The name of the text file must directly follow the -l option. (By default, APGetInfo writes any error messages to the screen, STDOUT, and to the default log file, apgetinfo.log.)

Note: If the log file you specify is a read-only file, a warning is displayed and nothing is written to the log file. Make sure that your log file is write-enabled.

apgetinfo -l
path\mylogfile.txt
[options] path\input.pdf
-p and -l combined Write progress and error messages to the given log file name If the -p and -l options are both specified, progress and error messages will be written to the file that you specify. apgetinfo -p -l
path\mylogfile.txt
[options] path\input.pdf

Registration Number

The following table describes how to pass the registration number to APGetInfo.

Note: Do not call the apgetinfo script from another script or application. Call apgetinfoapp directly, as shown in the example below.

Option Function Description Example
-r Pass APGetInfo registration number This option can be used to supply your registration number to APGetInfo from a script or another application. This option is typically not necessary and is available for use in cases where the Appligent License File can not be located by the application because of runtime environment restrictions. apgetinfoapp -r
XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
[other options]