InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPDFFormXObjectData Class Referenceabstract

#include <IPDFFormXObjectData.h>

Inheritance diagram for IPDFFormXObjectData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPDFFORMXOBJECTDATA }
 
typedef KeyValuePair< FormID,
K2Vector< UID > > 
Forms
 
typedef KeyValuePair< int32,
K2Vector< FormID > > 
Pages
 
typedef K2Vector< FormsFormList
 
typedef K2Vector< PagesPageList
 

Public Member Functions

virtual void CopyData (IPDFFormXObjectData const *otherData)=0
 
virtual void SetRepeatInfo (int32 numberDefinitionPages, int32 totalNumberPages, bool16 bSuppressOnLastPage)=0
 
virtual int32 GetNumberDefinitionPages () const =0
 
virtual int32 GetTotalNumberPages () const =0
 
virtual bool16 GetSuppressFormOnLastPage () const =0
 
virtual void AddToFormList (FormID formID, K2Vector< UID > uidList)=0
 
virtual void AddToPageList (int32 pageNum, K2Vector< FormID > formIDList)=0
 
virtual void RemoveFromFormList (FormID formID)=0
 
virtual void RemoveFromPageList (int32 pageNum)=0
 
virtual void ClearFormList ()=0
 
virtual void ClearPageList ()=0
 
virtual K2Vector< UIDGetPageItemUIDsForFormID (FormID id) const =0
 
virtual K2Vector< FormID > GetFormIDsForPageNum (int32 pageNum) const =0
 
virtual FormList GetFormList () const =0
 
virtual PageList GetPageList () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Data to be used to create Form XObject constructs when exporting to PDF. There are two lists maintained, a Forms List and a Pages List. The Forms list contains consecutive UIDs in the draw order (i.e. use IterateDrawOrder to initialize the lists). The Form is uniquely identified by a FormID. The Pages list is a list of pages in which the forms are used. The forms used on a page are identified by their FormID.

Member Function Documentation

virtual void IPDFFormXObjectData::AddToFormList (FormID formID,
K2Vector< UIDuidList 
)
pure virtual

Add a vector of UIDs to the Form list for the given form ID. The UIDs are consecutively drawn page items that make up a static portion of the page. The list of UIDs will be used to determine the bounding box for the Form XObject. Also, the first UID in the list will be used to determine when the form starts.

Parameters
formIDIN a unique form ID to which to list refers.
uidListIN the vector of UIDs which represent the static page items.
virtual void IPDFFormXObjectData::AddToPageList (int32 pageNum,
K2Vector< FormID > formIDList 
)
pure virtual

Add a vector of form IDs to the Page list for the given page number. The form IDs are all the forms that are drawn on that given page.

Parameters
pageNumIN the page number (zero based) which to list refers.
formIDListIN the vector of FormIDs which are used on the page.
virtual void IPDFFormXObjectData::ClearFormList ()
pure virtual

Remove (clear) all the vectors of UIDs from the Form list.

virtual void IPDFFormXObjectData::ClearPageList ()
pure virtual

Remove (clear) all the vectors of FormIDs from the Page list.

virtual void IPDFFormXObjectData::CopyData (IPDFFormXObjectData const * otherData)
pure virtual

Copy all the information from the given interface into this interface.

Parameters
otherDataIN the data which to copy from.
virtual K2Vector<FormID> IPDFFormXObjectData::GetFormIDsForPageNum (int32 pageNum) const
pure virtual

Retrieve the vector of FormIDs for the given page number. These are the forms that are defined and used for the given page.

Parameters
pageNumIN which page to retrieve.
Returns
K2Vector of FormIDs that are used on the page.
virtual FormList IPDFFormXObjectData::GetFormList () const
pure virtual

Retrieve the Form list. This is a vector of key/value pairs which are the unique FormIDs (key), and a vector of the page items (value) that will be drawn into a Form XObject PDF construct.

Returns
FormList which is a vector of Forms key/value pairs.
virtual int32 IPDFFormXObjectData::GetNumberDefinitionPages () const
pure virtual

Get the number of definition pages. This should be greater than or equal to the largest page number defined in the page list. For multiple records per page, this will be 1. For single record per page, this will be the number of pages in the pub.

Returns
int32 the number of definition pages.
virtual K2Vector<UID> IPDFFormXObjectData::GetPageItemUIDsForFormID (FormID id) const
pure virtual

Retrieve the vector of UID for the given form ID from the Form list. The UIDs are the page items that will be drawn into a Form XObject PDF construct.

Parameters
formIDIN which vector to retrieve.
Returns
K2Vector of UIDs representing consecutively drawn page items that make up the form.
virtual PageList IPDFFormXObjectData::GetPageList () const
pure virtual

Retrieve the Page list. This is a vector of key/value pairs which are page numbers (key) and a vector of FormIDs (value) that are used on the page.

Returns
PageList which is a vector of Pages key/value pairs.
virtual bool16 IPDFFormXObjectData::GetSuppressFormOnLastPage () const
pure virtual

Determine whether the Form XObject should be suppressed for the last page. This situation will occur if the form is defined for multiple records per page, but there is not an even number of records to fill out the form on the last page.

Returns
bool16 kTrue if the form should be suppressed on the last page, kFalse otherwise.
virtual int32 IPDFFormXObjectData::GetTotalNumberPages () const
pure virtual

Get the total number of pages being exported. For multiple records per page, this should be the number of records divided by the number of records per page. For single records per page this will be then number of pages in the pub times the number of records.

Returns
int32 the total number of pages being output.
virtual void IPDFFormXObjectData::RemoveFromFormList (FormID formID)
pure virtual

Remove a vector of UIDs from the Form list for the given form ID.

Parameters
formIDIN which vector to remove.
virtual void IPDFFormXObjectData::RemoveFromPageList (int32 pageNum)
pure virtual

Remove a vector of FormIDs from the Page list for the given page number.

Parameters
pageNumIN which vector to remove.
virtual void IPDFFormXObjectData::SetRepeatInfo (int32 numberDefinitionPages,
int32 totalNumberPages,
bool16 bSuppressOnLastPage 
)
pure virtual

Set the information regarding the repeatability of the static data. For example, for data merge, if merging a single record per page, the number of definition pages will be the number of pages in the pub, the total number of pages will be the number of pages in the pub times the number of records. Since the forms are page based, it may be necessary to suppress the form on the final page.

Parameters
numberDefinitionPagesIN number of pages defining the static and variable parts. For example, if doing multiple records per page, this would be set to 1. If doing a single record per page, it would be the number of pages in the pub.
totalNumberPagesIN the total number of pages being output.
bSuppressOnLastPageIN whether to suppress the form on the last page or not. This is necessary if doing multiple records per page, yet the last page lacks enough record data to be completely filled out.