Content Access Functions

The Content Access module is required to use these functions.

This chapter includes the following sections:

CAOpenContent

CAOpenContent is used to initiate content access for a file that has been opened by DAOpenDocument.

Prototype

DAERR CAOpenContent(
   VTHDOC         hDoc;
   VTLPHCONTENT   phContent;
)

phContent is not a file handle.

Parameters

Return Values

CACloseContent

CACloseContent is called to terminate content access for a file.

Prototype

DAERR CACloseContent(
   VTHCONTENT   hContent;
)

Parameters

Return Values

CAReadFirst

This function is called to set the read pointer to the beginning of the document content and to obtain the file identification property for the document.

Prototype

DAERR CAReadFirst(
   VTHCONTENT         hContent;
   PSCCCAGETCONTENT   pGetContent;
)

Parameters

Return Values

CAReadNext

CAReadNext is called to retrieve text and properties from a file, beginning at the location where the last content was provided.

Prototype

DAERR CAReadNext(
   VTHCONTENT         hContent;
   PSCCCAGETCONTENT   pGetContent;
)

Parameters

Return Values

SCCCAGETCONTENT Structure

typedef struct SCCCAGETCONTENTtag
   {
   VTDWORD         dwStructSize;
   VTDWORD         dwFlags;
   VTDWORD         dwMaxBufSize;
   VTDWORD         dwType;
   VTDWORD         dwSubType;
   VTDWORD         dwData1;
   VTDWORD         dwData2;
   VTDWORD         dwData3;
   VTDWORD         dwData4;
   VTDWORD         dwDataBufSize;
   VTVOID       *  pDataBuf;
   } SCCCAGETCONTENT, * PSCCCAGETCONTENT;

Each piece of content has a type and a subtype. Based on the type and subtype, the content is described by using up to four VTDWORDs and a data buffer provided by the caller. The dwStructSize, dwFlags, pDataBuf and dwMaxBufSize elements of this structure should be filled by the caller before calling CAReadNext or CAReadFirst.

CAContentStatus

This function is used to determine if there were conversion problems during a conversion. It will return a structure that describes areas of a conversion that may not have high fidelity with the original document.

Prototype

DA_ENTRYSC DAERR DA_ENTRYMOD CAContentStatus(VTHCONTENT hContent, VTDWORD dwStatusType, VTLPVOID pStatus);

Parameters

Return Values

SCCERR_OK: Returned if there were no problems. Otherwise, one of the other SCCERR_ values in sccerr.h is returned.

EXSUBDOCSTATUS Structure

The SCCCASTATUSINFORMATION is defined to be the same as EXSTATUSINFORMATION, which is defined as follows:

typedef struct EXSTATUSINFORMATIONtag
{    
   VTDWORD dwVersion;              /* version of this structure */    
   VTBOOL bMissingMap;             /* a PDF text run was missing the toUnicode table */    
   VTBOOL bVerticalText;           /* a vertical text run was present */    
   VTBOOL bTextEffects;            /* a run that had unsupported text effects applied.  One example is Word Art */    
   VTBOOL bUnsupportedCompression; /* a graphic had an unsupported compression */    
   VTBOOL bUnsupportedColorSpace;  /* a graphic had an unsupported color space */    
   VTBOOL bForms;                  /* a sub documents had forms */    
   VTBOOL bRightToLeftTables;      /* a table had right to left columns */    
   VTBOOL bEquations;              /* a file had equations */    
   VTBOOL bAliasedFont;            /* The desired font was missing, but a font alias was used*/    
   VTBOOL bMissingFont;            /* The desired font wasn't present on the system */    
   VTBOOL bSubDocFailed;           /* a sub document was not converted */    
   VTBOOL bTypeThreeFont;          /* a PDF Type 3 embedded font was encountered */    
   VTBOOL bUnsupportedShading;     /* a PDF input file had an unsupported shading type */    
   VTBOOL bInvalidHTML;            /* invalid HTML was encountered */    
   VTBOOL bVectorObjectLimit;      /* The vector object limit was reached */    
   VTBOOL bInvalidAnnotationNotApplied;    /* Annotation/Redaction wasn't displayed */    
   VTBOOL bInlineImageFound;       /* An inline image was found and may not have been rendered */    
   VTBOOL bIncorrectPageSize;      /* a PDF file was larger than 200 in x 200 in, as specified in the PDF reference guide */    
   VTBOOL bIncorrectPageSize_lower;/* a PDF file was smaller than 3 units x 3 units, as specified in the PDF reference guide */    
   VTBOOL bPDFOneToMany;           /* A PDF input file contained an embedded font with a ToUnicode table which maps one Unicode value to multiple glyphs */    
   VTBOOL bIsBidi;                 /* a PDF file contains Bi-Directional Text*/    
   VTBOOL bUnsupportedFont;        /* an unsupported font was encountered */    
   VTDWORD currPathSize, maxPathLimit; // Current size of the paths seen, Max number of Paths allowed    
   VTDWORD currVectSize, maxVectLimit; // Current size of the Vectors seen, Max number of Vectors allowed    
   VTDWORD currObjtSize, maxObjtLimit; // Current size of the Objects seen, Max number of Objects allowed    
   VTBOOL bFontWidthUsed;          /* a PDF file is using Width parameter to change widths of glyphs */
} EXSTATUSINFORMATION;

Note: When processing a document, Content Access never uses fonts, so bAliasedFont and bMissingFont will never report TRUE.

bVectorObjectLimit applies only to WebView Export, and bInvalidAnnotationNotApplied applies only to Image Export, PDF Export, and Web View Export.

CASeek

Move to a position in CA.

Prototype

DA_ENTRYSC DAERR DA_ENTRYMOD CASeek( VTHCONTENT hContent,  PSCCDAPOS pPos )

Parameters

Return Values

DAERR_BADPARAM SCCERR_OK: One of the function parameters was invalid.

CATell

Get position of CA.

Prototype

DA_ENTRYSC DAERR DA_ENTRYMOD CATell ( VTHCONTENT hContent,  PSCCDAPOS pPos )

Parameters

Return Values

DAERR_BADPARAM SCCERR_OK: One of the function parameters was invalid.