Sunday, January 23, 2022

#1 2022-01-07 05:16:11 am

MonkeyTennis
Member
Registered: 2019-07-31
Posts: 1

Opening multi-page PDFs in Illustrator

Hi there

First post, so please be patient and kind...

I have hundreds of multipage PDF files that I need to edit in Illustrator CC. I have the editing part sorted but am struggling to open the PDFs with the page range option set to "All" and the "Import PDF pages as links for optimal performance" un-checked. I can specify and open a specific page using the script below however I need to open all pages, which I understand created a new "untitled" file but I can get the name to as it with from the open command...

Please help

set chosenfile to (choose file)
tell application "Adobe Illustrator"
    set user interaction level to never interact
    set page of PDF file options of settings to 1
    open chosenfile as alias without dialogs
end tell

Offline

 

#2 2022-01-07 09:54:48 am

Mockman
Member
From:: Toronto
Registered: 2020-05-27
Posts: 176

Re: Opening multi-page PDFs in Illustrator

Per the documentation (for CC 2017), there is no 'all'. The page must be an integer.

FWIW, I'm not really sure what it would mean to use 'all' when opening a document, as this seems to be which page should the document be on — as in, 'I opened the book to page 20'. What is it that you're trying to accomplish?

Last edited by Mockman (2022-01-07 11:45:01 pm)

Offline

 

#3 2022-01-09 07:32:07 am

mingione
Member
Registered: 2009-07-07
Posts: 12

Re: Opening multi-page PDFs in Illustrator

I think you had most of what you needed...

Applescript:

set chosenfile to (choose file)
tell application "Adobe Illustrator"
   set user interaction level to never interact
   --set page of PDF file options of settings to 1
   set page range of PDF file options of settings to "all" --this will open all pages. You may also specify a page range. From the library: page range (text) : Range of pages when opening a multipage document [possible values: 'all', range(for example: '1,2,3-5,8')]
   open chosenfile as alias without dialogs
end tell

Andrew

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)