Copy link to clipboard
Copied
Hello All,
I am trying to migrate my InDesign Dektop plugin to Indesign Server plugin. Everything except following is working without any issue, Can someone tell me why following calls are not working in Indesign Server. What is the alternative for this?
Here actually I am trying to get destination info of type kPageDestination & kTextAnchorDestination
On InDesign Server this call (docHyperlinkTable->GetDestinationKeyToUIDMapBeginIter();) doesn't return valid pointer
IDataBase *db = GetDataBase(iDocument);
int32 itterator = 0;
InterfacePtr<IHyperlinkTable> docHyperlinkTable(db, db->GetRootUID(), UseDefaultIID());
const int32 numDestinations(docHyperlinkTable ? docHyperlinkTable->GetHyperlinkDestinationCount() : 0);
// search the list of hyperlinks destination on this document
UniqueKeyToUIDMap::const_iterator iter = docHyperlinkTable->GetDestinationKeyToUIDMapBeginIter();
for(;iter != docHyperlinkTable->GetDestinationKeyToUIDMapEndIter(); ++iter)
{
const UID hlDestUID = iter->second;
InterfacePtr<const IHyperlinkDestination> destination(db, hlDestUID, UseDefaultIID());
ASSERT(destination);
if(destination)
{
const IHyperlinkDestination::DestType type = destination->GetType();
if(type == IHyperlinkDestination::kPageDestination)
{
if(pageIndex)
{
PMString destInfo;
destination->GetInfo(&destInfo);
----
----
----
}
}
else if(type == IHyperlinkDestination::kTextAnchorDestination)
{
if(IndexArr)
{
InterfacePtr<IHyperlinkTextDestinationData> destData(db, hlDestUID, UseDefaultIID());
if(destData)
{
UID textmodel_uid = destData->GetTextModelUID();
if(textmodel_uid == textModel)
{
UID textmark_uid = destData->GetTextMarkerUID();
InterfacePtr<IHyperlinkTextDestinationMarker> textmarkdata(db, textmark_uid, UseDefaultIID());
if(textmarkdata)
{
----
----
----
----
}
}
}
}
}
}
}
Thank You 🙂
Copy link to clipboard
Copied
Sorry its my bad, I was using InDesing Server 17.0.0.96 but it works properly with newer version of InDesign Server 17.2
So please ignore this post