beautypg.com

Content, Syntax, Parameters example – Kofax DM API User Manual

Page 326

background image

306 C

HAPTER

5

%CONTENT

%CONTENT

This token is used to retrieve a stream for the content of the document.
It can also be used to update the document.

Syntax

PCDGetDoc.GetPropertyValue(“%CONTENT”)

PCDPutDoc.GetPropertyValue(“%CONTENT”)

Parameters

Example

'Create the object.

pGetDoc = CreateObject("PCDClient.PCDGetDoc.1")


'check for errors

checkError(pGetDoc, "ERROR_CREATEGETDOC")


'add library to the search criteria

pGetDoc.AddSearchCriteria("%TARGET_LIBRARY", library)


'add docnum the search criteria

pGetDoc.AddSearchCriteria("%DOCUMENT_NUMBER", docnum)


'add version of the doc the search criteria

pGetDoc.AddSearchCriteria("%VERSION_ID", version_id)


'run the search

pGetDoc.Execute()


'check error

checkError(pGetDoc, "ERROR_CHECKOUTFILESIZE")

%CONTENT

Used with the

PCDGetDoc object, the

%CONTENT token retrieves a pointer to
a

PCDGetStream object that allows

the program to get the content of the
document.

Used with the

PDCPutDoc object, the

%CONTENT token retrieves a pointer to
the

PCDPutStream object so the

content of the document can be written.