Highlighted

Hyperlink location in Indesign file.

Community Beginner ,
Mar 15, 2020

Copy link to clipboard

Copied

Hii,

    I got information about hyperlinks while reading Adobe Indesign file using HyperlinkTable.Using below technique:

 

  InterfacePtr<IHyperlinkTable> docHyperlinkTable(iDataBase, iDataBase->GetRootUID(), IID_IHYPERLINKTABLE);

                        const int32 numDestinations(docHyperlinkTable ? docHyperlinkTable->GetHyperlinkDestinationCount() : 0);

 

                         // search the list of hyperlinks on this document

                        for (UniqueKeyToUIDMap::const_iterator iter = docHyperlinkTable->GetDestinationKeyToUIDMapBeginIter();

                             iter != docHyperlinkTable->GetDestinationKeyToUIDMapEndIter(); ++iter)

                        {

                            const UID hlDestUID = iter->second;

                            InterfacePtr<const IHyperlinkDestination> destination(iDataBase, hlDestUID, UseDefaultIID());

                            ASSERT(destination);

                            if(destination)

                            {

                                const IHyperlinkDestination::DestType type = destination->GetType();

                                                         

                                PMString text;

                                PMString urlext;

                                destination->GetName(&text);

                                destination->GetInfo(&urlext);

                           }

                        }

 

    But How to indentify that hyperlinks  to it's realated text frame (means location of that hyperlink or  it's belongs to which text frame)?

Views

40

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Hyperlink location in Indesign file.

Community Beginner ,
Mar 15, 2020

Copy link to clipboard

Copied

Hii,

    I got information about hyperlinks while reading Adobe Indesign file using HyperlinkTable.Using below technique:

 

  InterfacePtr<IHyperlinkTable> docHyperlinkTable(iDataBase, iDataBase->GetRootUID(), IID_IHYPERLINKTABLE);

                        const int32 numDestinations(docHyperlinkTable ? docHyperlinkTable->GetHyperlinkDestinationCount() : 0);

 

                         // search the list of hyperlinks on this document

                        for (UniqueKeyToUIDMap::const_iterator iter = docHyperlinkTable->GetDestinationKeyToUIDMapBeginIter();

                             iter != docHyperlinkTable->GetDestinationKeyToUIDMapEndIter(); ++iter)

                        {

                            const UID hlDestUID = iter->second;

                            InterfacePtr<const IHyperlinkDestination> destination(iDataBase, hlDestUID, UseDefaultIID());

                            ASSERT(destination);

                            if(destination)

                            {

                                const IHyperlinkDestination::DestType type = destination->GetType();

                                                         

                                PMString text;

                                PMString urlext;

                                destination->GetName(&text);

                                destination->GetInfo(&urlext);

                           }

                        }

 

    But How to indentify that hyperlinks  to it's realated text frame (means location of that hyperlink or  it's belongs to which text frame)?

Views

41

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 15, 2020 0

Have something to add?

Join the conversation