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

#include <IStructureMarks.h>

Inheritance diagram for IStructureMarks:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTRUCTUREMARKS }
 
enum  TableRowType { kBodyRow = 0, kHeaderRow, kFooterRow }
 
enum  ListType { kNone = 0, kBulleted, kNumbered }
 

Public Member Functions

virtual ErrorCode BeginBook (int32 docInfoIndex, DocPageIndexList docIndexList, bool16 readerSpreads)=0
 
virtual ErrorCode EndBook ()=0
 
virtual ErrorCode BeginDocument (IDataBase *db)=0
 
virtual ErrorCode EndDocument ()=0
 
virtual ErrorCode BeginPage (int32 indexPageInfo, UID pageUID)=0
 
virtual ErrorCode EndPage ()=0
 
virtual ErrorCode BeginNestedContent ()=0
 
virtual ErrorCode EndNestedContent ()=0
 
virtual ErrorCode BeginTextFrame (const IMultiColumnTextFrame *mcFrame)=0
 
virtual ErrorCode EndTextFrame (const IMultiColumnTextFrame *mcFrame)=0
 
virtual ErrorCode BeginParagraph (ICompositionStyle *compositionStyle, IWaxLine *waxLine, const IWaxRun *waxRun, IStyleInfo *styleInfo, IDrawingStyle *drawingStyle, IStructureMarks::ListType listType=IStructureMarks::kNone, int32 listLevel=0, bool isStartWithEndnote=false, UID endnoteUID=kInvalidUID)=0
 
virtual ErrorCode BeginHyperlink ()=0
 
virtual ErrorCode AddLinkAnnotation (int32 annotation)=0
 
virtual ErrorCode EndHyperlink ()=0
 
virtual ErrorCode BeginTextRun (IWaxRun *waxRun, IDrawingStyle *drawingStyle, LanguageID languageID, bool32 oneCharSpan, textchar oneChar, UID paragraphStyleUID)=0
 
virtual ErrorCode AddTextElement (int32 element)=0
 
virtual ErrorCode EndTextRun ()=0
 
virtual ErrorCode BeginFigure ()=0
 
virtual ErrorCode EndFigure (IDataBase *db, UID pageItemUID)=0
 
virtual ErrorCode BeginTableFrame (PMRect &bbox, bool32 firstTableFrame, bool32 oneFrameTable)=0
 
virtual ErrorCode BeginTableRow (IStructureMarks::TableRowType rowType=IStructureMarks::kBodyRow)=0
 
virtual ErrorCode BeginTableCell (int32 spanWidth, int32 spanHeight)=0
 
virtual ErrorCode EndTableFrame (bool32 lastTableFrame, IDataBase *db, UID pageItemUID)=0
 
virtual void BeginPageItemDrawing (IPMUnknown *pageItem, const PMMatrix &matrix)=0
 
virtual void EndPageItemDrawing (IPMUnknown *pageItem)=0
 
virtual void BeginArtifacts ()=0
 
virtual void EndArtifacts ()=0
 
virtual ErrorCode BeginLayer (CosObj layerInfo)=0
 
virtual ErrorCode EndLayer ()=0
 
virtual bool32 RecordingStructure ()=0
 
virtual bool32 RecordingHyperlinks ()=0
 
virtual ErrorCode BeginFootnoteReference ()=0
 
virtual ErrorCode EndFootnoteReference ()=0
 
virtual ErrorCode BeginEndnoteReference ()=0
 
virtual ErrorCode EndEndnoteReference ()=0
 
virtual ErrorCode BeginFootnote ()=0
 
virtual ErrorCode EndFootnote ()=0
 
virtual ErrorCode BeginTableCellHyperlink ()=0
 
virtual void SetTagIndexOnce (bool16 setValue)=0
 
virtual void BeginAnchoredObject (IDataBase *db, UID pageItemUID)=0
 
virtual void EndAnchoredObject (IDataBase *db, UID pagetItemUID)=0
 
virtual ErrorCode BeginEndnote ()=0
 
virtual ErrorCode EndEndnote ()=0
 
virtual bool IsEndnoteRun ()=0
 
virtual void AddAnchoredObjectMarker (const IPMUnknown *inlineData, TextIndex textIndex)=0
 
virtual ErrorCode AddEndnoteLinkAnnotation (int32 annotation)=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

This interface contains methods to watch important events during PDF export. You can get this interface from a IGraphicsPort (gPort) using this: InterfacePtr<IStructureMarks> structureMarks(gPort, IID_ISTRUCTUREMARKS);

Member Enumeration Documentation

Enumerates the different types of lists.
Enumerator
kNone 

Regular paragraph

kBulleted 

Bulleted list

kNumbered 

Numbered list

Enumerates the different types of table rows.
Enumerator
kBodyRow 

Table body row

kHeaderRow 

Table header row

kFooterRow 

Table footer row

Member Function Documentation

virtual void IStructureMarks::AddAnchoredObjectMarker (const IPMUnknowninlineData,
TextIndex textIndex 
)
pure virtual

This method is called when an anchored object marker (anchor) is encountered.

Parameters
IPMUnknown*inlineData: The anchored object's IInlineData interface.
TextIndextextIndex: The position in the parent story where the object is anchored.
virtual ErrorCode IStructureMarks::AddEndnoteLinkAnnotation (int32 annotation)
pure virtual

This method is called in order to add an endnote link annotation.

Parameters
int32annotation: The endnote annotation.
See Also
IPDFHyperlinks::CreateEndnoteRefLink, IPDFHyperlinks::CreateEndnoteRangeLink
Returns
kSuccess if the annotation was added successfully. Currently only returns kSuccess.
virtual ErrorCode IStructureMarks::AddLinkAnnotation (int32 annotation)
pure virtual

This method is called when a link annotation is added to the current hyperlink.

Parameters
int32annotation: index of the annotation.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::AddTextElement (int32 element)
pure virtual

This method is called when a text element is added to the current text run.

Parameters
int32element: index of the text element.
Returns
ErrorCode: Return kSuccess when successful.
virtual void IStructureMarks::BeginAnchoredObject (IDataBasedb,
UID pageItemUID 
)
pure virtual

This method is called at the beginning of exporting an anchored object.

Returns
none.
virtual void IStructureMarks::BeginArtifacts ()
pure virtual

This method is called at the beginning of exporting artifacts. Artifacts are page items or text that is not tagged in the PDF file.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginBook (int32 docInfoIndex,
DocPageIndexList docIndexList,
bool16 readerSpreads 
)
pure virtual

This method is called at the beginning of export. It is called even for the one document case.

Parameters
int32docInfoIndex: index to the document information.
DocPageIndexListdocIndexList: index to the document page list.
bool16readerSpreads: kTrue when exporting reader spreads.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginDocument (IDataBasedb)
pure virtual

This method is called at the beginning of a exporting a document.

Parameters
IDataBase*db: the document being exported.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginEndnote ()
pure virtual

This method is called at the beginning of exporting an endnote text.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginEndnoteReference ()
pure virtual

This method is called at the beginning of exporting an endnote reference.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginFigure ()
pure virtual

This method is called at the beginning of PDF Figure. A figure is an inline or pageitems with IFigureElement interface.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginFootnote ()
pure virtual

This method is called at the beginning of exporting a footnote item.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginFootnoteReference ()
pure virtual

This method is called at the beginning of exporting a footnote reference.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginHyperlink ()
pure virtual

This method is called at the beginning of exporting a hyperlink.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginLayer (CosObj layerInfo)
pure virtual

This method is called at the beginning of exporting a layer.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginNestedContent ()
pure virtual

This method is called when a new PDF content stream is started.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginPage (int32 indexPageInfo,
UID pageUID 
)
pure virtual

This method is called at the beginning of a exporting a page.

Parameters
int32indexPageInfo:
UIDpageUID: the page UID or spread UID being exported.
Returns
ErrorCode: Return kSuccess when successful.
virtual void IStructureMarks::BeginPageItemDrawing (IPMUnknownpageItem,
const PMMatrixmatrix 
)
pure virtual

This method is called at the beginning of exporting a page item.

Parameters
IPMUnknown*pageItem: the page item being exported.
constPMMatrix &matrix: the matrix of the page item.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginParagraph (ICompositionStylecompositionStyle,
IWaxLinewaxLine,
const IWaxRunwaxRun,
IStyleInfostyleInfo,
IDrawingStyledrawingStyle,
IStructureMarks::ListType listType = IStructureMarks::kNone,
int32 listLevel = 0,
bool isStartWithEndnote = false,
UID endnoteUID = kInvalidUID 
)
pure virtual

This method is called at the beginning of exporting a paragraph. BeginParagraph will not be called when the export starts in the middle of a paragraph. There is no EndParagraph because it wouldn't necessarily match up with the BeginParagraph.

Parameters
ICompositionStyle*compositionStyle: composition style of the paragraph.
IWaxLine*waxLine: wax for the paragraph.
IStyleInfo*styleInfo: style info of the paragraph.
IDrawingStyle*drawingStyle: drawing style of the paragraph.
IStructureMarks::ListTypelistType: list type - none, bulleted or numbered.
int32listLevel: Paragraph nesting level inside a list structure. 0 stands for top level list paragraph. Can run upto any level.
boolisStartWithEndnote: true if we want to start endnote before paragraph.
UIDendnoteUID: the UID of the endnote.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTableCell (int32 spanWidth,
int32 spanHeight 
)
pure virtual

This method is called at the beginning of a table cell.

Parameters
int32spanWidth: the number of columns that this cells spans.
int32spanHeight: the number of rows that this cells spans.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTableCellHyperlink ()
pure virtual

This method is called at the beginning of exporting a hyperlink inside a table cell.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTableFrame (PMRectbbox,
bool32 firstTableFrame,
bool32 oneFrameTable 
)
pure virtual

This method is called at the beginning of a table frame. A figure is an inline or pageitems with IFigureElement or IFigureElementOptional interface.

Parameters
PMRect&bbox: the bounding box of the table frame.
bool32firstTableFrame: true when this table contains the first table frame.
bool32oneFrameTable: true when the table is in only one frame.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTableRow (IStructureMarks::TableRowType rowType = IStructureMarks::kBodyRow)
pure virtual

This method is called at the beginning of a table row.

Parameters
IStructureMarks::TableRowTyperowType: type of the row - body, header or footer.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTextFrame (const IMultiColumnTextFramemcFrame)
pure virtual

This method is called at the beginning of exporting a text frame.

Parameters
IMultiColumnTextFrame*mcFrame: the text frame being exported.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::BeginTextRun (IWaxRunwaxRun,
IDrawingStyledrawingStyle,
LanguageID languageID,
bool32 oneCharSpan,
textchar oneChar,
UID paragraphStyleUID 
)
pure virtual

This method is called at the beginning of exporting a text run.

Parameters
IWaxRun*waxRun: waw run pointer.
IDrawingStyle*drawingStyle: drawing style pointer.
LanguageIDlanguageID: Language ID of the run.
bool32oneCharSpan: true when the run is a special one character run.
textcharoneChar: the special character when oneCharSpan is true.
UIDparagraphStyleUID: the paragraph style UID for the run.
Returns
ErrorCode: Return kSuccess when successful.
virtual void IStructureMarks::EndAnchoredObject (IDataBasedb,
UID pagetItemUID 
)
pure virtual

This method is called at the end of exporting an anchored object. There are matching BeginAnchoredObject and EndAnchoredObject calls.

Returns
none.
virtual void IStructureMarks::EndArtifacts ()
pure virtual

This method is called at the end of exporting artifacts. There are matching BeginArtifacts and EndArtifacts calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndBook ()
pure virtual

This method is called at the end of export. It is called even for the one document case. There are matching BeginBook and EndBook calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndDocument ()
pure virtual

This method is called at the end of exporting a document. There are matching BeginDocument and EndDocument calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndEndnote ()
pure virtual

This method is called at the end of exporting an endnote text. There are matching BeginEndnote and EndEndnote calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndEndnoteReference ()
pure virtual

This method is called at the end of exporting an endnote reference. There are matching BeginEndnoteReference and EndEndnoteReference calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndFigure (IDataBasedb,
UID pageItemUID 
)
pure virtual

This method is called at the end of exporting a PDF Figure. There are matching BeginFigure and EndFigure calls.

Parameters
IDataBase*db: the document being exported.
UIDpageItemUID: the page item UID of the figure.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndFootnote ()
pure virtual

This method is called at the end of exporting a footnote item. There are matching BeginFootnote and EndFootnote calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndFootnoteReference ()
pure virtual

This method is called at the end of exporting a footnote reference. There are matching BeginFootnoteReference and EndFootnoteReference calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndHyperlink ()
pure virtual

This method is called at the end of exporting a hyperlink. There are matching BeginHyperlink and EndHyperlink calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndLayer ()
pure virtual

This method is called at the end of exporting a layer. There are matching BeginLayer and EndLayer calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndNestedContent ()
pure virtual

This method is called when a new PDF content stream is finished. There are matching BeginNestedContent and EndNestedContent calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndPage ()
pure virtual

This method is called at the end of exporting a page. There are matching BeginPage and EndPage calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual void IStructureMarks::EndPageItemDrawing (IPMUnknownpageItem)
pure virtual

This method is called at the end of exporting a page item. There are matching BeginPageItemDrawing and EndPageItemDrawing calls.

Parameters
IPMUnknown*pageItem: the page item being exported.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndTableFrame (bool32 lastTableFrame,
IDataBasedb,
UID pageItemUID 
)
pure virtual

This method is called at the end of exporting a table frame. There are matching BeginTableFrame and EndTableFrame calls.

Parameters
bool32lastTableFrame: true when this is the last frame of this table.
IDataBase*db: document being exported.
UIDpageItemUID: the text frame page item UID.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndTextFrame (const IMultiColumnTextFramemcFrame)
pure virtual

This method is called at the end of exporting a text frame. There are matching BeginTextFrame and EndTextFrame calls.

Parameters
IMultiColumnTextFrame*mcFrame: the text frame being exported.
Returns
ErrorCode: Return kSuccess when successful.
virtual ErrorCode IStructureMarks::EndTextRun ()
pure virtual

This method is called at the end of exporting a text run. There are matching BeginTextRun and EndTextRun calls.

Returns
ErrorCode: Return kSuccess when successful.
virtual bool IStructureMarks::IsEndnoteRun ()
pure virtual

Is this an endnote text run?

Returns
true if this is an endnote text run, false otherwise.
virtual bool32 IStructureMarks::RecordingHyperlinks ()
pure virtual

This method returns true when hyperlinks are being recorded.

Returns
bool32: true when recording hyperlinks, false otherwise.
virtual bool32 IStructureMarks::RecordingStructure ()
pure virtual

This method returns true when structure is being recorded.

Returns
bool32: true when recording structure, false otherwise.
virtual void IStructureMarks::SetTagIndexOnce (bool16 setValue)
pure virtual

This method is called to specify that the first paragraph of the text frame needs to be tagged as an index.

Parameters
setValue,:if kTrue, the first paragraph is tagged as an index and the flag is then reset, so that rest of the paragraphs are tagged as list items.
Returns
ErrorCode: Return kSuccess when successful.