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...

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.

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...

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?

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…

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:

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.

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.

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.

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.

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.

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.

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.

(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.

Paal, Mark is right about that, I simply did not supply options for arranging the artboards. I decided to arrange them in rows until the drawing area limits were reached, then loop back to start new row.

It seems to me by what you're posting that you need a "special" arrangement, if that's the case, then it won't be possible. I can only do rows, columns and a grid or rows and columns, just like the options the UI offers. Other types of arrangements could be theoretically possible, but it wouldn't be practical to gather the data from the user. The best way would be to use the artboard tool and drag them to a position that works for you.

I downloaded your script on a whim, thinking I'd never really have a use for it. Just finished modifying 60 pages of music in four documents for a concert emergency, just in time, thanks to your script. Much obliged.

You could create one with no problem Carlos and make some cash on the side. The coding you do here is much more advanced than HTML and CSS and you already know alot of the Javascript root. I agree with you Nate! I would pay as well. You could even purchase one of the those premade template sites and make a killing. Sort of like a coding doctor that gets paid by diagnosis.

thanks guys, I'll look into it, I'm not aiming at making a killing but if in the future Scripting becomes my day job, I'll gladly take it. I just wonder how one would make a living making free products...well, unless you're Instagram

The same way people make a living building websites. The basic code is already there, but someone has to put it together, make sense of it and make it work. Because of you and Mark, I’ve became pretty valuable at work with my new knowledge, and I really appreciate it. You don’t realize how much money your knowledge saves people, given it is using Adobe products, but you would be more a less a consultant like a lot of those guys who write add-ins for Excel. The code is already there, but they make sense of it.

And no different than when you call Microsoft and they charge you 69.95 to help you fix your PC. Help is valuable!