20.07.2014 Views

DOC1 Programmer's Guide

DOC1 Programmer's Guide

DOC1 Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Programming PCE<br />

Support for AFPDS Indexing<br />

Several commands allow the reading, writing and<br />

manipulating of AFPDS Tag Logical Element (TLE)<br />

structured fields. A TLE has a name by which it can<br />

be identified and an index value.<br />

TLEs can be stored either within individual pages or<br />

within an AFP document header. When working<br />

with document level TLEs you should normally read<br />

the pages of a document into a PCE document group<br />

structure to ensure the header is included. Any<br />

number of TLEs can be present in pages or<br />

document headers.<br />

If you are using partial read/writes to create a new<br />

document group (i.e. you are specifying the start,<br />

middle and end keywords as part of add document<br />

group) then you must ensure that the TLE<br />

commands are used before the start portion is written<br />

to the output file. See the example below for an<br />

example of the required sequence of commands.<br />

If required you can also extract from or add pages to<br />

an existing document group by using the extract<br />

document page and move page commands. You<br />

may want to do this if you need to work with page<br />

level TLEs in the original AFP pages that are to<br />

make up the group.<br />

Page level TLEs<br />

To read the value of an existing page level TLEs use<br />

the TLE command. Use the TLE add, TLE delete<br />

or TLE replace commands with the page keyword to<br />

adjust the index settings for a page.<br />

Document level TLEs<br />

Before you can use any command related to<br />

document level TLEs you must first read the<br />

appropriate pages into a PCE document group (see<br />

“Document Groups” on page 21).<br />

To read existing TLEs in the group use the<br />

document TLE command. Use the TLE add, TLE<br />

delete or TLE replace commands with the document<br />

keyword to adjust the index settings within a<br />

document header.<br />

Example of sequencing TLE index commands for a document group<br />

read 10 pages of document start from file into ;<br />

add document name of "Big Group" to at start;<br />

add document TLE of attrib "first_tle" value "Index1" to <br />

write 1 item to from ;<br />

read 10 pages of document middle from file into ;<br />

write 1 item to from ;<br />

read 10 pages of document end from file into ;<br />

add document name of "Big Group" to at end;<br />

write 1 item to from ;<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!