Skip to main content
Participating Frequently
October 7, 2009
Question

How to get full path of indesign document as well as picture path.

  • October 7, 2009
  • 1 reply
  • 1074 views

Hi all,

I am working in InDesign CS4 plugins. and I have two quetions,

1) How can we get the indesign document full path. I am able only to get the document name but i want the full path of it.

2) How can we get the selected picture path also. I am able only to get its name.

Please let me know if any one have idea of  it.

Regards,

Jitendra Kumar Singh

This topic has been closed for replies.

1 reply

Participant
October 15, 2009

//to get full path of document, works for both mac and pc

IDocument *document = Utils<ILayoutUIUtils>()->GetFrontDocument();

IDataBase* theDb = ::GetDataBase(document);

const IDFile* sysFile = theDb->GetSysFile();

InterfacePtr<ICoreFilename> cfn((ICoreFilename*)::CreateObject(kCoreFilenameBoss, IID_ICOREFILENAME));

if

(cfn != NULL){

     if(cfn->Initialize(sysFile)

== 0){

          PMString fulldocumentnameandpath = FileUtils::SysFileToPMString(*sysFile);

     }

}

Hope this helps,

Liz Patten