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

Introducing: Open Multi-Page PDF win/mac

Community Expert ,
Jan 07, 2012 Jan 07, 2012

Copy link to clipboard

Copied

Hi all, many users have expressed their desire for a way to open multipage PDFs in Illustrator and for a couple of years now, mac users have enjoyed the use of a script by Shane Stanley to do just that...at first I wanted to translate his script into VB so PC users could benefit from it...since I couldn't get the source code, I decided to give my own version a try using JS....here's the result.

Use with caution, save everything before running until you're comfortable it won't mess things up. I didn't try opening a crazy amount of pages, I "only" opened 35 in about minute and a half. Let us know how many pages you're able to open before you crash Illustrator...

it works with CS4 and CS5 only, windows and mac

have comments?, questions? let me know...enjoy. Carlos Canto

openMultiPagePFD4.PNG

openMultiPagePFD1.PNG

openMultiPagePFD2.PNG

openMultiPagePFD3.PNG

Download:

http://www.fileswap.com/dl/QDc2eDC9v4/AI_openMultiPagePDF_CS4_CS5.zip.html

TOPICS
Scripting

Views

163.1K

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
Adobe
LEGEND ,
Jan 08, 2012 Jan 08, 2012

Copy link to clipboard

Copied

Thanks Carlos!

Doesn't seem to ever acknowledge a PDF is selected with AI15.1.0/MacOS 10.7.2. So can't ever get past the select PDF stage.

It does open and work with AI15.1.0 and Mac OS10.6.8 but after the script finishes running it opens the ExtendScript ToolKit as well. It's a minor thing to quit the Toolkit and switch back to AI where all the pages are there.

Nice work!

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
Guru ,
Jan 08, 2012 Jan 08, 2012

Copy link to clipboard

Copied

Scott, its not Carlos's script as such… Illustrator has a bug/problem with LIon it will no longer take a File Object or String with the '~' OS tilde…

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
Community Expert ,
Jan 08, 2012 Jan 08, 2012

Copy link to clipboard

Copied

Hi Mark, thanks for coming to the rescue, I wouldn't have got a clue how deal with that on a mac...now, why would Lion add a tilde to the file name? is there a way to get rid of it? perhaps turning the path to absolute URI?

thanks for helping out

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
Guru ,
Jan 08, 2012 Jan 08, 2012

Copy link to clipboard

Copied

Carlos, my Lion kitty is still in the box… Won't be getting installed any time soon… I can't try or test… only pass on what issues I've seen posted in the scripting forum… Lion did not add a tilde to mac file specification OSX has always been like that its just the user home… thus far I have only seen issues reported in the Illustrator scripting forum so I think the choking on '~' is an Illustrator + Lion issue… May be using .fsName for a full string would fix I can't really say…

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
Community Expert ,
Jan 08, 2012 Jan 08, 2012

Copy link to clipboard

Copied

Hi Scott, thanks for checking and reporting back, the ESTK opening was my bad, I always have it open and never thought of testing with it switched off...anyway I fixed it, I'll post another link shortly...I'll wait for Mark to see if there's a way to fix the Lion issue...

thanks

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
Community Beginner ,
Jan 10, 2012 Jan 10, 2012

Copy link to clipboard

Copied

I was looking for something to enable this about a month ago, and today I found another use for it and went searching... You rock, Carlos! Thanks!

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
Community Expert ,
Jan 11, 2012 Jan 11, 2012

Copy link to clipboard

Copied

you're welcome, here's the next version, this one won't open the ESTK at the end of the run. It still doesn't work with Lion ...we're looking into it.

http://www.fileswap.com/dl/MD3MqpHzIv/AI_openMultiPagePDF_CS4_CS5.V1.01.zip.html

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
LEGEND ,
Jan 15, 2012 Jan 15, 2012

Copy link to clipboard

Copied

Carlos:

It still doesn't work with Lion ...we're looking into it.

Is this bug written up somewhere? It appears that File.openDialog() returns a File object with an fsName starting with file:// which confuses the rest of the machinery, which is existing a POSIX path. The solution is to strip any leading file:// and create a new File object. So add the second of these two lines on line 61:

var fileRef = File.openDialog ("Select PDF...", "*.pdf"); // get the file

fileRef = new File(fileRef.fsName.replace("file://",""));

This seems to fix it for me on 10.7.2.

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
Community Expert ,
Jan 15, 2012 Jan 15, 2012

Copy link to clipboard

Copied

Hi John, thanks for checking, I had no idea it was a bug til Scott posted it wasn't working on Lion...I would have loved to do the testing myself but I'm on Windoze

I'll add the line, test it on windows, and post a revision to the script...

thanks for your input.

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
Community Expert ,
Jan 15, 2012 Jan 15, 2012

Copy link to clipboard

Copied

here's the new one, I added the fix posted by John, it didn't affect Windows. Can someone test it on Lion? also can you please try to open a file by typing in the box instead of using the File...button? and also after selecting a valid file, can you please edit the file name typing a non valid file name...I'm trying to find out if the "Open" button gets disabled.

thanks in advance

http://www.fileswap.com/dl/ZER81f4HRb/AI_openMultiPagePDF_CS4_CS5.v1.02.zip.html

thanks John

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
Community Beginner ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Hey Carlos!

Thanks...:)

I am using my Macbook Pro running Lion 10.7.2.

I downloaded the script and added it to the JavaScript folder (is this the right folder?)

Opened Illustrator -> File -> Scripts -> Other Scripts -> (browsed for the script)

Opened the pdf file in preview and noticed the amount of pages. Can the script have an autodetect so it selects all the pages in the pdf?

Went back to the script dialog box and changed the To area to the amount of pages. Clicked Open.

(I have a few 16 page pdf files that I need to change the logo for each page)

Gradually it opened seemingly on top of each other. Clicked ok. 14 artboards from left to right. 2 artboards below on the left. Hmm I forgot how to adjust the layout of the artboards, can anyone give me the hint on doing so?

I tested the script with 2 16 page pdf files and it looks good!

Now if only you could add the script to Indesign as well...:) As I noticed that Indesign can not open pdf files.

Have a great day!

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
Guru ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

You place PDF's in indesign… Anyhows a script…

http://indesignsecrets.com/placing-all-the-pages-of-a-pdf-inside-indesign.php

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
Community Beginner ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Thanks Mark!

I am also looking for ways to have the pdf files editable inside Indesign.

Adobe really should improve the pdf editing features in Illustrator and Indesign. I find it weird that Indesign can not even bring in pdf files. Since Indesign and Illustrator both can save out to pdf files it seems natural that both programs can open these kinds of files and also edit them.

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

PDF is not intended for editing.

On top of that: those apps that can create PDFs (like CorelDraw, Keynote, AutoCAD, Scribus, InDesign, Photoshop, OpenOffice) are different, have different functions and options - so making a PDF fully editable would be like creating the universal file format.

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

UFF...now that would be cool, a Universal File Format

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

how does attempting to get total PageCount and arrange artboards Options sound for a Version 2?

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Total page count sounds really nice.

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
Guru ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Carlos, arranging artboards can be done at new document creation… Rearrange artboards can be used when ever… Your PDF page count can be a bit tricky…

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Hi Mark, that's correct, getting page count is tricky...in next version I will try, the PDFs I can get the page count I will display it and the ones that don't have that info, I'll just do page 1 as default, like in the original version.

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
Valorous Hero ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

While certainly not a universal file format, several applications can open and use PDF content pretty darn well. For the flier or small brochure type of PDFs, I use Xara Designer Pro (use it quite a lot anyway). For "publication" types of PDFs I need to redo, I use Serif's PagePlus with the text setting set to "Flow" (versus "Tight").

Depending on how the PDF is constructed and by what originating app, the contents are editable in most all respects in either of the two above applications.

As for a so-called universal graphic format, well, SVG is one such attempt.

Take care, Mike

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
Community Expert ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

Hi Paal, to rearrange artboards, grab the Artboard Tool, then you can freely move your artboards around with it, make sure the Move/Copy Artwork with Artboard option is selected.

as Monika mentioned, PDF files are meant to be "viewed", not to be edited. I guess minor modifications/additions are ok though, don't expect to have full control.

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
Community Beginner ,
Feb 10, 2012 Feb 10, 2012

Copy link to clipboard

Copied

This is a reply to Monika:

Even though there is no universal standard it is better to have the opportunity to open a pdf and edit in Illustrator and Indesign then no chance at all. Of course if needed there can be a warning that the contents might look different then expected or the pdf not even be editable at all during the opening of a pdf file. Trying is better then not trying.

Carlos:

Yeah I know that I can move each individual artboard around. But I find it cumbersome with having to move around 16 or more into a position that works for me.

Mark:

Yes arranging the arboards can be done at new document creation but since we are not creating a new document but opening a pdf file in Illustrator there is no option on arranging the artboards.

Carlos:

It would be great with having the arrange artboards in your next version of the file! Thank you...:)

Perhaps an options button that opens a tab or slides out to show arrange artboards etc.

Total page count of a pdf is also very good. Then I do not need to check the pdf beforehand to see how many pages it contains.

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
Guru ,
Feb 10, 2012 Feb 10, 2012

Copy link to clipboard

Copied

Yes arranging the arboards can be done at new document creation but since we are not creating a new document but opening a pdf file in Illustrator there is no option on arranging the artboards.

This is simply NOT true… I read the syntax… If you count the *.pdf pages then the artboard arrangement can be set up when creating the new doc… Carlos will know what I meant…

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
Community Beginner ,
Feb 10, 2012 Feb 10, 2012

Copy link to clipboard

Copied

(Mark it seems I missed something somewhere please correct me but this is what I meant) After opening the multipage pdf file and going into Document Setup there is no option on how the artboards should be laid out (atleast what I can notice) I look forward to when Carlos adds it into the options of his script.

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