How to Remove PDF Import Options Dialogbox in Illustrator

New Here ,
Mar 29, 2021 Mar 29, 2021

Copy link to clipboard

Copied

I am using below API for opening the PDF in Illustrator.

However, For some PDF, I am getting Import PDF Dialogbox.

API : 

AIAPI AIErr(* AIDocumentListSuite::OpenNoHistory)(const ai::FilePath &fileSpec, AIColorModel colorMode, ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle *document)

 

The same Dialogbox appears if we try to open the PDF file in Illustrator by UI: File -> Open in Illustrator 2020.

 

For example, getting-started-guide.pdf is the PDF file available with the illustrator SDK, by opening the same file in illustrator, It pop up the PDF Import Dialogbox.

 

For Some PDF, It is not launching the PDF Import Dialogbox, For example, SamplePDF.pdf is attached of 2 Pages.

 

I  don't want illustrator to launch the PDF Import Dialogbox while opening the PDF in illustrator, What should I do?

PDF_Import_Options.JPG

 

 

TOPICS
SDK, Third party plugins

Views

76

Likes

translate

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
Community Beginner ,
Mar 29, 2021 Mar 29, 2021

Copy link to clipboard

Copied

I'm half-guessing here but for a multipage PDF file to correctly open in Adobe Illustrator it had to have been saved or exported out of Adobe Illustrator in the first place, that way the entire artboard structure remains intact.

 

If you export a PDF file from e.g. Adobe InDesign there is no Illustrator-style artboard information stored in the files. If you try to open such a PDF file in Illustrator it rather gives you the option to choose which pages to import instead.

 

Hope this makes sense.

Likes

translate

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 ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Thanks for the reply.

 

I have found a way to suppress the PDF Import Options dialogbox by following code:

Link of discussion : https://community.adobe.com/t5/illustrator/need-to-suppress-the-save-popup/m-p/2094149

Code:

sASUserInteraction->SetInteractionAllowed(kASInteractWithNone);

 

The above line of code forces illustrature to use the defaulr setting for opening the PDF without launching the 'PDF Import Options' dialogbox.

However, The Default setting in 'PDF Import Options' dialogbox is to Select the Page Range 1-1.

Hence, Only the first page of the PDF file is opening in the Illustrator.

 

Do you know any way to change the default settings of the  'PDF Import Options' dialogbox ?

 

Likes

translate

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