
72
5
Working with Documents and Files
This chapter explains how to use the Acrobat core API to perform operations on PDF documents and files,
such as opening a PDF document in an external window. When working with documents and files, you use
the following typedefs:
●
An
AVDoc
typedef (from the AV layer) represents a document as a window in Acrobat or Adobe Reader.
A single
AVDoc
object exists for each displayed document. Operations on
AVDoc
objects are usually
visual modifications to the document’s view.
●
A
PDDoc
typedef (from the PD layer) represents a document as a PDF file. You work with
PDDoc
objects
to make changes to a document’s contents. Using a
PDDoc
object, you can access components, such as
a
PDPage
object.
●
An
ASFile
typedef (from the AS layer) represents a document as an open file.
This chapter contains the following information.
Opening PDF documents
You can use the Acrobat core API to create application logic that opens a PDF document in Acrobat or
Adobe Reader. The method that opens a PDF file is
AVDocOpenFromFile
. Before you invoke this method,
you must create an
ASPathName
object, which is a platform-independent path value that specifies the
PDF file to open.
As of Acrobat or Adobe Reader 8.0, you can open PDF documents that are based on Unicode-named files.
For information, see
“Working with Unicode Paths” on page 160
.
You can create an
ASPathName
object by using different techniques. This section describes how to create
an
ASPathName
object by invoking the
ASFileSysCreatePathName
method to convert a platform
specific path name to an
ASPathName
object. This method requires the following arguments:
●
An
ASFileSys
object that represents the file system in which you are creating an
ASPathName
object. For information, see
“Creating an ASFileSys object” on page 162
.
Topic
Description
See
Opening PDF documents
Describes how to programmatically open a PDF document.
page 72
Opening a PDF document in
an external window
Describes how to open a PDF document from within an
external window.
page 74
Bridging core API layers
Describes the Acrobat core API methods that enable you to
work between different API layers.
page 83
Printing documents
Describes how to programmatically print PDF documents.
page 87