Displaying A Pdf Document Within A Window - Adobe ACROBAT SDK 8.1 Manual

Developing plug-ins and applications
Table of Contents

Advertisement

Adobe Acrobat SDK
Developing Plug-ins and Applications
The address of an
is not set as the
The address of an
The
AVAppOpenDialog
Open button). If the user clicks the Cancel button, then
ASPathName * pathName = NULL;
ASBool bSelected = AVAppOpenDialog(&dialogParams, NULL,
(ASPathName**)&pathName, NULL, NULL);
11. Release existing
ASTextDestroy (filterRec.filterDescription);
ASTextDestroy (dialogParams.windowTitle);
Note:
This application logic is shown in

Displaying a PDF document within a window

Before you attempt to display a PDF document within an external window, you must programmatically
create the window. For information, see
To display a PDF document within an external window, perform the following tasks:
1. Open a PDF file by invoking the
An
information, see
An
An
ASFILE_READ
The address of an
opened (file information is obtained from the
If the
ASFileSysOpenFile
returned.
2. Display the PDF document within the window by invoking the
method and passing the following arguments:
An
address was passed to the
An
object by invoking the
The address of the
the parameters for an external window" on page
The following code example opens a PDF document in an external window. The application logic that is
located within the
document within the window. A structure named
open is also defined.
AVArraySize
value.
flags
AVFilterIndex
method returns
objects by invoking the
ASText
object that represents the file system in which the PDF file is located. For
ASFileSys
"Creating an ASFileSys object" on page
object that represents the path in which the PDF file is located.
ASPathName
object that represents the mode in which to open the file. For example, specify
ASFileMode
to open the PDF document in read mode.
ASFile
method is successful, then
object that specifies a PDF file to display (you can use the same
ASFile
object that specifies the text to display in the window's title bar. Create an
ASText
ASTextFromScriptText
AVDocOpenParamsRec
OpenExternalWindow
object. This value can be NULL if
object. This value can be NULL.
if the user clicks the action button (for example, the
true
ASTextDestroy
"Opening a PDF document in an external window" on page
"Creating a Window" on page
ASFileSysOpenFile
object. This method populates this argument with the file that was
ASPathName
ASFileSysOpenFile
object that you created. For information, see
75.
user-defined function creates the window and displays a PDF
gDocInfo
Working with Documents and Files
Displaying a PDF document within a window
kAVOpenSaveAllowMultiple
is returned.
false
method.
75.
method and passing the following arguments:
162.
object).
is returned. Otherwise, an error value is
0
AVDocOpenFromASFileWithParams
method).
method.
that stores information such as the file to
79
80.
object whose
ASFile
ASText
"Defining

Advertisement

Table of Contents
loading

Table of Contents