• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AVAppGetActiveDoc on Portfolio returns selected pdf not the collection

New Here ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

Hello all.

AVAppGetActiveDoc works fine for single document. It returns me current active AVDoc and then I can copy it to file and then process:

AVDoc pAVDoc = AVAppGetActiveDoc();
PDDoc pDoc = AVDocGetPDDoc(pAVDoc);
PDDocCopyToFile(pDoc, &params);

Portfolio pdf also comes as single pdf file and contains several inside. But unfortunatly AVAppGetActiveDoc does not return a collection object, it returns the one selected in the Porfolio. As the result I can not copy to file the full Portfolio document:

PDDoc pDoc = AVDocGetPDDoc(pAVDoc);
PDCollection pdCollection = PDDocGetPDCollection(pDoc);
PDCollectionIsValid(pdCollection); // FALSE

Is there any way to get the Portfolio object instead of internal pdf one?

TOPICS
Acrobat SDK and JavaScript

Views

288

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
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 27, 2021 Jan 27, 2021

Random thought: do you know how to iterate a PDCollection to see if a given PDDoc is a member (I do not). If so you can iterate the AVDocs to find the parent. 

Votes

Translate

Translate
LEGEND ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

Random thought: do you know how to iterate a PDCollection to see if a given PDDoc is a member (I do not). If so you can iterate the AVDocs to find the parent. 

Votes

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
community guidelines
New Here ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

LATEST

Thank you. It helped.

I enumerated through all AVDocs with AVAppEnumDocs() and realy there is one more for Portfolio document. Then I found that it is the parent of returned active.

Votes

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
community guidelines