How can I retrieve the .pdf file name from an OdDbPdfReference object?

  1. FAQ
  2. »
  3. PDF and PRC Questions

Use the following code fragment as a sample:

OdDbObjectId idDefinition = pPdfRef->definitionId();
OdDbPdfDefinitionPtr pDef = idDefinition.openObject();
OdString strActiveFileName = pDef->activeFileName();
OdString strSourceFileName = pDef->sourceFileName();

This sample fragment assumes that the variable pPdfRef is a smart pointer to an instance of the OdDbPdfReference class, which has been correctly created and added to the drawing database.