APGetInfo is a command-line utility that enables you to retrieve a broad range of information about your PDF documents.
- Document information. This is similar to the descriptive information you would find with Adobe® Acrobat®’s Document Properties feature. It includes file name, author, subject, creation date, and so on, with some added statistics about fonts.
- Page Size information. The following statistics about each page in the document are included: full page size, printable page area, and degree of page rotation, if any.
- Bookmark information. A bookmark is a link to a specific page or view in a PDF document. You can obtain a list of bookmarks that optionally includes bookmark pages, named destinations, and the total number of bookmarks.
- Annotation information. This includes information about annotations, such as notes and highlights; popups associated with annotations; and links. The color and coordinates of each annotation can be included with the output.
- Form Field information. Form fields include text boxes, multi-line text boxes, check boxes, combo boxes, list boxes, buttons, radio buttons, and signatures. For each form field, APGetInfo returns the field name, field type, field value, and alternative name (tool tip text).
- Metadata information. XML 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. APGetInfo extracts metadata for both schemas.
- Encryption information. Reports if a PDF file is encrypted and if so, which bit strength is set as well as which options are allowed and not allowed.
This guide contains numerous example commands to illustrate how to use APGetInfo.
Although you can call APGetInfo from a script or a program, most of the example commands are run from the command line. This presentation enables you to focus on APGetInfo without the distraction of other programming instructions. If you are new to entering commands in a terminal window or just need a refresher, read Command-Line Introduction, before trying the examples yourself.
The command-line examples are presented as if they were being run from the directory where you installed APGetInfo. In Windows, the default installation directory is C:\Appligent\APGetInfo. In Unix and Macintosh systems, it is wherever you installed it. For purposes of illustration, we assume you installed it in Appligent/APGetInfo.
Some long commands are shown on more than one line in this manual. However, you should enter all commands on a single line in the terminal window.
These sample PDF files are included with APGetInfo and are used in the example commands:
They are located in the samples subdirectory where you installed the product.
You are encouraged to use these files to try the example commands yourself. But first make backups, in case you accidentally overwrite the files.
The following typographic conventions are used in this guide:
- Courier Font is used for commands, command options, and output to mimic the appearance of the screen:
the -annot option
- The dollar sign character ($) is used to represent the command prompt:
$apgetinfo -annot samplefile.pdf
- Square brackets in a command indicate that the enclosed information may optionally be included but is not required. In the following example, [ inPDFFile2… ] indicates that additional input files may be included with the command, but are not required:
$apgetinfo -annot inPDFFile1 [ inPDFFile2... ]
The remainder of this guide contains the following chapters:
- Getting Started with APGetInfo describes the basic structure of APGetInfo commands and tells you how to get product information about your installation of APGetInfo.
- Getting Document Information explains how to retrieve basic information about a PDF document, similar to that found with Adobe Acrobat’s Document Properties feature with some added statistics, including font information.
- Managing Input and Output explains the basics of managing file input and output.
- Getting Page Size Information explains how to get information about the size and rotation of the pages.
- Getting Bookmark Information explains how to retrieve information about the bookmarks.
- Getting Annotation Information explains how to retrieve information about the annotations.
- Getting Form Field Information explains how to retrieve information about the form fields.
- Exporting XML Metadata explains how to retrieve XML metadata.
- Reporting Progress and Errors – APGetInfo describes various methods of handling progress and error messages.
- Command Line Introduction – APGetInfo provides a brief introduction to using command-line software on Windows and Mac OS X operating systems.
- Command Line Option Reference - APGetInfo summarizes the APGetInfo command-line options and tells you where to look in this manual for more information about each option.
- Troubleshooting describes the steps you can take if you do not get the results you expect when you run APGetInfo.
- Support provides information for contacting support if you have any problems.
The best way to use this guide depends on your familiarity with command-line software in general and Appligent command-line products in particular.
- If you have little or no experience with command-line software, start with Command Line Introduction. That will give you a basic understanding of how APGetInfo works. Then read the remaining “how-to” chapters or skip to Command Line Option Reference for a summary of all the command-line options.
- If you are an experienced command-line user, but are not familiar with Appligent command-line products, start with Getting Document Information, Managing Input and Output, and Getting Page Size Information. They will give you a basic understanding of how APGetInfo works. Then read the remaining “how-to” chapters or skip to Command Line Option Reference for a summary of all the command-line options.
- If you are an experienced command-line user and are familiar with Appligent command-line products, start with Command Line Option Reference. This appendix illustrates the general command-line syntax and summarizes the command-line options. You can always refer to one of the “how-to” chapters for more information about a particular option.
Please refer to the installation guide and the Readme File (release notes) for more information. Both are located on the installation CD and in the default directory.