Working with PDF Documents
Creating and Editing Page Content
5
52
Acrobat SDK User’s Guide
Creating and Editing Page Content
Page content
is a major component of a PDF file. It represents the visible marks on a page
that are drawn by a set of PDF marking operators. The set of marking operators for a page is
also referred to as a
display list
, since it is a list of marking operations that represent the
displayed portion of a page. See the
PDF Reference
for an overview of page content streams
and references to other chapters that describe the marking operators in detail.
PDFEdit API
The PDFEdit API provides easy access to PDF page contents. With PDFEdit, your plug-in can
treat a page’s contents as a list of objects rather than manipulating the content stream’s
marking operators.
PDFEdit is meant to be used in conjunction with the Acrobat PD layer and Cos layer
methods for manipulating PDF documents. To use PDFEdit effectively, you should be
familiar with PDF page marking operators and the PD layer of the core API, described in the
Acrobat and PDF LIbrary API Overview
.
Acrobat Distiller and PDFWriter create documents from PostScript or as output from a
printer driver. Non-PDFEdit methods in the core API allow displaying and printing
documents, and provide the ability to rearrange pages and to add annotations. However,
most of these manipulations are creation-centered, or only deal with objects at the page
level and above. PDFEdit methods, on the other hand, allow your plug-in to deal with
objects at the level of a page’s contents.
There is no Acrobat JavaScript equivalent to the PDFEdit API to allow you to manipulate
page content.
For more information, see the
Acrobat and PDF Library API Overview
.
PDFEdit Samples
There are several “snippets” available from the
SnippetRunner
sample plug-in that
demonstrate how to add data to the contents of a page. Using the Acrobat core API greatly
simplifies modifying and creating PDF page contents. In addition, Acrobat updates the byte
offset table and page resources to ensure that the PDF file is still readable after
modification. This would be significantly more complex if this were attempted by parsing
and rewriting the page contents without using the core API, and could result in an
unreadable PDF file.
For more information, see the
SnippetRunner Cookbook
.
Содержание Acrobat 7.0.5
Страница 10: ...Contents 10 Acrobat SDK User s Guide ...
Страница 66: ...Modifying the User Interface Customizing Acrobat Help 6 66 Acrobat SDK User s Guide ...
Страница 72: ...Using Online Collaboration and Annotations Using Stamps in Approval Workflows 7 72 Acrobat SDK User s Guide ...
Страница 78: ...XML and the Acrobat SDK Managing XML based Information 8 78 Acrobat SDK User s Guide ...
Страница 100: ...Providing Document Security Document Rights 11 100 Acrobat SDK User s Guide ...
Страница 106: ...Working with Metadata Object Data 12 106 Acrobat SDK User s Guide ...
Страница 110: ...Searching and Indexing Indexing PDF Documents 13 110 Acrobat SDK User s Guide ...
Страница 118: ...Working With PDF Layers Working with Layers from a Plug in 15 118 Acrobat SDK User s Guide ...