
Adobe Acrobat SDK
Working with Documents and Files
Developing Plug-ins and Applications
Printing documents 87
//Create a platform-independent path
ASPathName MakeCrossPlatformASPathName (char* platformPathname)
{
ASPathName ThePathName = NULL;
ThePathName = ASFileSysCreatePathName (NULL,ASAtomFromString("Cstring"),
platformPathname, 0);
return ThePathName;
}
Printing documents
You can use the Acrobat core API to print documents by using one of the following methods:
●
AVDocPrintPages
●
AVDocPrintPagesWithParams
The
AVDocPrintPages
method prints a document without displaying any user dialog boxes. The current
printer, page settings, and job settings are used. Printing is complete when this method returns.
The
AVDocPrintPagesWithParams
method prints a document with a full range of options. Printing is
complete when this method returns. It performs embedded printing; that is, it allows a PDF page to print
within a bounding rectangle on a page. It allows interactive printing to the specified printer.
To print a document with a range of options, invoke the
AVDocPrintPagesWithParams
method and
pass the following arguments:
●
An
AVDoc
object that represents the PDF document from which to print page. For information about
creating an
AVDoc
object, see
“Opening PDF documents” on page 72
.
●
An instance of the
AVDocPrintParams
data structure that defines printing parameters. For
information about this data structure, see the
Acrobat and PDF Library API Reference
.