![]() | InDesign SDK 20.5 |
#include <IPDFHyperlinks.h>

Classes | |
| class | PageDestination |
Public Types | |
| enum | { kDefaultIID = IID_IPDFHYPERLINKS } |
| enum | DestinationType { DestXYZ = 0, DestFit, DestFitH, DestFitV, DestFitR, DestFitB, DestFitBH, DestFitBV } |
| enum | NamedType { NextPage = 0, PrevPage, FirstPage, LastPage } |
Public Member Functions | |
| virtual ErrorCode | BeginBook (PDDoc thePDDoc, bool32 addHyperlinks, IDataBase *db, bool32 addBookmarks, bool32 bookExport, DocPageIndexList docIndexList, bool16 readerSpreads, bool16 layers=false)=0 |
| virtual ErrorCode | EndBook ()=0 |
| virtual ErrorCode | BeginDocument (IDataBase *db)=0 |
| virtual ErrorCode | EndDocument ()=0 |
| virtual ErrorCode | BeginPage (PDPage thePDPage, PMRect &pageBounds, PMMatrix &pageBoundsToSpreadMatrix, UID pageUID)=0 |
| virtual ErrorCode | EndPage ()=0 |
| virtual ErrorCode | HyperlinkHotSpot (const PMRect &hotSpot, const PMString &name, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | HyperlinkHotSpotPage (const PMRect &hotSpot, int32 pageIndex, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | HyperlinkHotSpotURL (const PMRect &hotSpot, const PMString &theURL, const bool32 isMap, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | HyperlinkHotSpotNamed (const PMRect &hotSpot, NamedType namedType, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | HyperlinkHotSpotExternal (const PMRect &hotSpot, const PMString &name, const PMString &fullpath, bool32 bNewWindow=false, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | HyperlinkDestination (const PMString &name, DestinationType destType, const PMRect *destRect=nil, const PMReal *zoomFactor=nil)=0 |
| virtual ErrorCode | GetLinkAnnotation (int32 annotation, CosObj *page, PDAnnot *annot)=0 |
| virtual ErrorCode | CreateHyperlink (IDataBase *db, UID hyperlinkUID, PMRect &hotSpot, int32 *linkAnnotation)=0 |
| virtual ErrorCode | HyperlinkHotSpotExternalPage (const PMRect &hotSpot, const PageDestination &pageDestination, const PMString &fullpath, bool32 bNewWindow=false, const HotSpotAttributes *pAttributes=nil, int32 *pAnnotation=nil)=0 |
| virtual ErrorCode | BeginLayer (CosObj layerInfo)=0 |
| virtual ErrorCode | EndLayer ()=0 |
| virtual ErrorCode | CreateEndnoteRefLink (IDataBase *db, UID endnoteUID, PMRect &hotSpot, int32 *linkAnnotation)=0 |
| virtual ErrorCode | CreateEndnoteRangeLink (IDataBase *db, UID endnoteRangeUID, PMRect &hotSpot, int32 *linkAnnotation)=0 |
| virtual ErrorCode | GetEndnotelinkAnnotation (int32 annotation, CosObj *page, PDAnnot *annot)=0 |
| virtual ErrorCode | GetHyperlinkAltText (int32 annotation, PMString &altText)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IPDFHyperlinks contains methods for creating PDF hyperlinks when exporting PDFs.
As a document is being exported to a PDF file, this interface is called to signal special events and these methods come in pairs, see BeginBook, EndBook, BeginDocument, EndDocument etc. The export process draws to a PDF port, similar to drawing to the screen or to a printer port. When it is on a page, between calls BeginPage, EndPage, you can call methods to create hyperlinks on the current page. See Hyperlink... methods.
You can get this interface from a IGraphicsPort (gPort) using this: InterfacePtr<IPDFHyperlinks> structureMarks(gPort, IID_IPDFHYPERLINKS);
Destination type.
| pure virtual |
This is called by the default implementation when starting a PDF export whether it is a book export
or a normal export.
| thePDDoc | is the PDDoc being created. |
| addHyperlinks | is true when the PDF export preference specifies hyperlinks. |
| db | is the database of the document being exported. |
| addBookmarks | is true when the PDF export preference specifies bookmarks. |
| bookExport | is true when exporting a book. |
| docIndexList | is the document page index list. |
| readerSpreads | is true when reader spreads are on. |
| layers | is true when exporting layers. |
| pure virtual |
This is called by the default implementation when starting to export a document. A book has one or
more documents.
| db | is the database of the document being exported. |
| pure virtual |
This is called by the default implementation when starting to export a layer of a document.
| layerInfo | is the layer information. |
| pure virtual |
This is called by the default implementation when starting to export a page of a document.
| thePDPage | is the PDPage being created. |
| pageBounds | is the page bounds. |
| pageUID | is the InDesign page UID being exported. |
| pure virtual |
Create a endnote link at endnote range on the current page with the given hot spot. The attributes and destination are
determined by the db, endnoteRangeUID.
| db | of endnoteRangeUID. |
| endnoteRangeUID | is the UID of the endnote range. |
| hotSpot | is the location of the hotspot rectangle on the page. |
| linkAnnotation | points to an optional return parameter. The int32 returned is a token used with |
| pure virtual |
Create a link at endnote reference on the current page with the given hot spot. The attributes and destination are
determined by the db, endnoteUID.
| db | of endnoteUID. |
| endnoteUID | is the UID of the endnote reference. |
| hotSpot | is the location of the hotspot rectangle on the page. |
| linkAnnotation | points to an optional return parameter. The int32 returned is a token used with |
| pure virtual |
Create a hyperlink on the current page with the given hot spot. The attributes and destination are
determined by the db, hyperlinkUID.
| db | of hyperlinkUID. |
| hyperlinkUID | is the hyperlinkUID. |
| hotSpot | is the location of the hotspot rectangle on the page. |
| linkAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
This is called by the default implementation when ending a PDF export whether it is a book export
or a normal export.
| pure virtual |
This is called by the default implementation when ending a document.
| pure virtual |
This is called by the default implementation when ending a layer of a document.
| pure virtual |
This is called by the default implementation when ending a page of a document.
| pure virtual |
Get the CosObj page and PDAnnot for the given endnote annotation. The annotation is valid between
BeginDocument and EndDocument.
| annotation | specifies the PDF endnote annotation to get. It comes from a previous call to one of the creation methods above. |
| page | is the page the hyperlink is on. |
| annot | is the PDF annotation. |
| pure virtual |
Get alternate text of hyperlink.
| annotation | specifies hyperlink annotation. |
| altText | stores alt text of hyperlink. |
| pure virtual |
Get the CosObj page and PDAnnot for the given annotation. The annotation is valid between
BeginDocument and EndDocument.
| annotation | specifies the PDF annotation to get. It comes from a previous call to one of the creation methods above. |
| page | is the page the hyperlink is on. |
| annot | is the PDF annotation. |
| pure virtual |
Create a hyperlink named destination on the current page at the given location with the given name.
| name | is the destination name to create. This name is matched up with the name specified by HyperlinkHotSpot. |
| destType | is the type of destination to create. |
| destRect | is an optional pointer to a reference rectangle. See DestinationType. |
| zoomFactor | is an optional pointer to a zoom factor. See DestinationType. |
| pure virtual |
Create a hyperlink on the current page that goes to a named destination.
| hotSpot | is the location of the hotspot rectangle on the page. |
| name | is the destination name. This is matched by name with the destination created with HyperlinkDestination. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
Create a hyperlink on the current page which goes to another PDF document.
| hotSpot | is the location of the hotspot rectangle on the page. |
| name | is the named destination in another PDF document. |
| fullpath | is the full path name to the PDF document. |
| bNewWindow | is optional. Pass true to open the new document in a new window. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
Create a hyperlink on the current page which goes to another PDF document.
| hotSpot | is the location of the hotspot rectangle on the page. |
| pageDestination | contains the page index along with destination parameters and specifies where it goes in the other document. |
| fullpath | is the full path name to the PDF document. |
| bNewWindow | is optional. Pass true to open the new document in a new window. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
Create a hyperlink on the current page which goes to the NamedType.
| hotSpot | is the location of the hotspot rectangle on the page. |
| namedType | is the destination, either first, last, next or prev page, see NamedType. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
Create a hyperlink on the current page which goes to the given page.
| hotSpot | is the location of the hotspot rectangle on the page. |
| pageIndex | is the destination page of the hyperlink. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |
| pure virtual |
Create a hyperlink on the current page which goes to the given URL.
| hotSpot | is the location of the hotspot rectangle on the page. |
| theURL | is the destination URL of the hyperlink. |
| isMap | is true to track the mouse position when the URI is resolved. |
| pAttributes | points to the optional hotspot attributes. When nil, the default attributes are used. |
| pAnnotation | points to an optional return parameter. The int32 returned is a token used with GetLinkAnnotation to get the associated PDF link annotation. |