Skip to main content
2개36042610
Participant
March 22, 2017
Question

I’d like to place a PDF file with multiple pages

  • March 22, 2017
  • 2 replies
  • 523 views

Hi,

I’d like to place a PDF file with multiple pages. But I cannot find any API to specify the page number to import from the illustrator SDK. Am I not finding it? Or is it missing? I need your help.

Thanks.

This topic has been closed for replies.

2 replies

2개36042610
Participant
March 24, 2017

LeoTaro,

Thanks for your reply.

But unfortunately this does not work for me.

I’m very appreciate if you give me a sample code using kAIPDFPageIndexKey.

I did like this.

sAIActionManager->AIActionSetStringUS(fActionParamValueRef, kAIPlaceDocumentActionNameKey, filePath.GetFullPath());

sAIActionManager->AIActionSetInteger(fActionParamValueRef, kAIPDFPageIndexKey, pdf_pgidx);

sAIActionManager->AIActionSetBoolean(fActionParamValueRef, kAIPlaceDocumentActionLinkKey, true);

sAIActionManager->AIActionSetBoolean(fActionParamValueRef, kAIPlaceDocumentActionReplaceKey, true);

sAIActionManager->AIActionSetBoolean(fActionParamValueRef, kAIPlaceDocumentActionTemplateKey, false);

sAIActionManager->PlayActionEvent(kAIPlaceDocumentAction, kDialogOff, fActionParamValueRef);

But this just shows the last page of PDF.

best regards,

Inspiring
March 24, 2017

If you record an action while doing a place, it also sets the kAIPDFPageCountKey integer key to the number of pages in the PDF.

Inspiring
March 23, 2017

You can use the action manager suite and use kAIPDFPageIndexKey to specify the page number.