Illustrator applescript open multi-page PDF error

Hi all, I am trying to create a script to find and replace objects in a multi-page pdf in Illustrator.  Everything else works except for open and save, which I still have to do manually.  I tried to open the file using the following
open myFile as PDF with options {class:PDF open options, page:4}
But Applescript returns the error "Expected class name but found application constant or consideration." 

Checkout this discussion
http://forums.adobe.com/thread/499840?tstart=0
esp the last from Mario Arizmendi

Similar Messages

  • Open multi page pdf specific page in Illustrator CS4 with apple script

    I need to open multi page pdf specific page in Illustrator CS4 with apple script. Is it something like this:
    activate  (open file theTargetFolder as PDF with options …).
    Thank you.

    Carlos,
    Muchas Gracias por tu colaboración y excelente script, el que se abra el ESTK no tiene mayor importancia.
    El caso es que Adobe recomienda encarecidamente NO utilizar Illustrator para editar PDFs, por diversas razones, aunque cuando no hay otro remedio o herramienta disponible, o conocida ...
    Para llegar aquí, aparte de San Google, hay que ir a Adobe.es (en mi caso), pestaña de Ayuda,  ..... (hasta aqui bien),
    luego hay que bajar hasta el final y ver Comunidad y Foros...... (esto puede ser)
    al pulsar aparacen un montón de foros se supone de programas pero en inglés,
    y la última línea es de International Forums,  ya casi hemos llegado)
    pulsamos entonces, y por fin se abren cuatro palabras con idiomas, en una dice: español      (casi no me lo puede creer)
    pincho y llego por fin aquí.
    Muy poca gente sabe de la existencia de este pequeño refugio, si a esta dificultad añadimos la peculiar forma de ser de la gente, ....

  • Batch open Multi page PDF's

    How can I batch/automate open a multi page PDF in CS3?
    I need to open multi page pdf's then rasterize them as individual jpegs, the "save As" from Acrobat or "export" is not good enough quality. They need to go through Photoshop.
    At the end of the day I want to create a droplet so I can drag a load of multi page PDF's onto it and
    let photoshop get on with it, I then come back 15-20 mins later, and hey presto there are all my converted CMYK 300 dpi Jpegs!
    Please help!!
    Thnx
    Simon

    If I recall correctly, Adobe changed the Acrobat JPG output after version 6. If you have Acrobat 6, you might try it.
    However, why do you say '
    CMYK 300 dpi Jpegs'? 'CMYK' implies that printing is your intent. Anti-aliased text is not ideal for printing as it becomes mushy. You might want at least 600 ppi art without anti-aliased text here for crisper text.
    Prematurely rasterizing this instead of sending the original PDF data to the printer seems very odd.

  • Opening multi-page pdfs - just opens the first page

    AI CS6: opening multi-page pdfs - choose page dialogue flashes for a milli-second & just opens the first page. Running Lion. Prior to CS6, it used to happen but then if I moved something on the page & reverted (f12), it would give me the dialogue box - but not anymore. Have trashed prefs, reinstalled - still the same - does anyone have any ideas?

    Do you have a copy of Acrobat 7 or 8 (Pro, not Reader)? If so, open the PDF in Acrobat and from the Document menu select Extract pages making sure you have checked the box that says Extract Pages as Separate Files.

  • Illustrator CS4 on Windows Vista 64--opening multi-page PDF

    I see that Illustrator CS4 will save multi-page PDFs, so I'm wondering what I'm missing that I cannot open all the pages of a multi-page PDF at once?  I'm receiving illustrations from an artist who uses a much older version of Illustrator and he sends them as a multipage PDF.  It would be a huge time saver to be able to open all the pages at once to grab out the art I need, but I can't seem to figure out how to do that.
    I apologize if this has been asked before.  This new forum format doesn't seem to yield itself to easily seeing frequently asked questions.

    But if it exports multi-page PDF, why can't it open it? I wouldn't think that would be a compatibility issue. PDF is not necessarily an AI format after all.
    In my mind, I guess that defeats the purpose of a multi-page (artboard) file, if you can't open a multi-page file--even if the opening requires some kind of conversion. I'd take a multi-page import or a multi-page convert.
    In a google search, I noticed that someone has written an applescript for Mac versions that will import multi-page PDFs to a multiple artboard AI file.  Any chance there is a script available that will work on Windows?  I upgraded my personal (Windows) copy of the suite, but chances are we'll be waiting on CS5 at work (where I have my Mac).

  • Trouble Opening Multi-page PDF in CS5

    Hello,
    I've been recently watching a lot of Illustrator tutorials from Lynda.com.The instructional videos are accompanied with a zip file that has excercise files in it to use so you you can work along with the video. I have those files. But the problem is that some of the files are multi-page pdfs with multiple artboards. You're supposed to be able to open the file and see all of  the artboards side by side at once. These files were made with Illustrator CS6. I'm trying to open them just as they appear on the video, but I'm using CS5. So when I try to open them, this little window pops up like this for example:
    So the only way to continue is to click OK.
    So I click OK and then the only thing that shows up is page 1 of 6 on the file.
    After that, I tried to place the file in a new document to see if it would work that way, but then a little box like this box pops up:
    Why does this pop up? It's telling me to select a single page out of the six included in the file. Shouldn't I be able to just open it and see all 6 artboards? thats what the guy has in the videos. And we're both using PCs Does CS5 have a problem openin newer files or something? I would really like to learn how to fix this problem.

    Your PDFs consist of 2 parts: an AI part and a PDF part.
    But the AI part can only be edited with the version it has been created in (or higher). If you don't have that version, you can only access the PDF part, which was never meant for editing purposes.
    YOu can only ask for compatible files if you want to really follow along.

  • Opening Multi-page PDFs in Illustrator CS2

    A client sent me a 32 page pdf that was originally created from a giant Illustrator file. (He doesn't have the original Illustrator file). I want to rebuild it using InDesign, and I need to save elements from each page to use in my new layout.
    So am I correct that in order to do this, I have to open the pdf in Illustrator, choose page 1 from the dialog, save it out as an Illustrator file. Then open the pdf again, choose page 2, save it out. And so on, up to page 32? In other words, I need to open the pdf 32 times to get at each page? I can't seem to find anything in my books addressing this. And there is no option for opening it as a multi-page Illustrator document (with page tiling).
    Thanks for any ideas!

    Do you have a copy of Acrobat 7 or 8 (Pro, not Reader)? If so, open the PDF in Acrobat and from the Document menu select Extract pages making sure you have checked the box that says Extract Pages as Separate Files.

  • Introducing: Open Multi-Page PDF win/mac

    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
    Download:
    http://www.fileswap.com/dl/QDc2eDC9v4/AI_openMultiPagePDF_CS4_CS5.zip.html

    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!

  • Illustrator CS6 suddenly won't open multi page PDF.

    I've been working on a PDF project for a few weeks now and it's been working perfectly. However yesterday, I was suddenly unable to open the PDF as a whole and instead, I was prompted to select a specific page to open. The strange thing is that other PDF files that I've been working with will still open with multiple artboards but this file won't. Does any one know what's casuing this?
    Any help or suggestions would be greatly appreciated. Thanks in advance!!

    If you check the option "Preserve Illustrator editability" in the PDF dialogbox, the PDF will contain the complete Ai file. If you don't (e.g. by selecting "smallest file size") then it won't contain the native AI data. Then you will see what you see.
    Unfortunately, if you don't have a backup, you cannot get the native data back.

  • Open Multi-Page PDF win/mac

    Que tal amigos foreros...en los foros en ingles muchos usuarios habian expresado la necesidad de editar PDFs Multipagina en Illustrator y mas los usuarios de PC, ya que por ahi existe un script, pero solamente es para mac. Asi que me di a la tarea de escribir uno...trabaja con CS4/CS5
    Espero les guste, o mas bien, espero les sea util
    si tienen preguntas o comentarios, dejenme saber
    Saludos, Carlos Canto

    Carlos,
    Muchas Gracias por tu colaboración y excelente script, el que se abra el ESTK no tiene mayor importancia.
    El caso es que Adobe recomienda encarecidamente NO utilizar Illustrator para editar PDFs, por diversas razones, aunque cuando no hay otro remedio o herramienta disponible, o conocida ...
    Para llegar aquí, aparte de San Google, hay que ir a Adobe.es (en mi caso), pestaña de Ayuda,  ..... (hasta aqui bien),
    luego hay que bajar hasta el final y ver Comunidad y Foros...... (esto puede ser)
    al pulsar aparacen un montón de foros se supone de programas pero en inglés,
    y la última línea es de International Forums,  ya casi hemos llegado)
    pulsamos entonces, y por fin se abren cuatro palabras con idiomas, en una dice: español      (casi no me lo puede creer)
    pincho y llego por fin aquí.
    Muy poca gente sabe de la existencia de este pequeño refugio, si a esta dificultad añadimos la peculiar forma de ser de la gente, ....

  • Multi-page pdf downloads???

    How do i download multipage pdfs within the Adobe illustrator program?  I know it is some sort of module within scrips...any ideas and feedback would be greatly appreciated.

    http://rwillustrator.blogspot.com/2011/03/convert-pdf-pages-to-illustrator.html
    I found this by searching for "Open Multi-Page PDF in Illustrator" in the Illustrator-scripting forum.
    Efidently it works as a drag and drop program. These posts have more info.
    http://forums.adobe.com/message/2285183#2285183
    http://forums.adobe.com/thread/499840?tstart=0
    http://forums.adobe.com/message/2221238#2221238#2221238
    P.S. For this particular solution, you need to be on a mac.

  • Creating multi-page PDF from Page Tiles

    Trying to save out a page-tiled Illustrator document to multi page PDF. The "Create Multi-Page PDF from Page Tiles" is ghosted/disabled when I save out as PDF; and printing to PDF doesn't size page edges properly. I've followed all directions and re-created new docs to see if I can get this to work, no luck.
    Is there a trick I'm missing? Using Illustrator CS3 13.0.2 Mac, Acrobat 8.1.3. Thanks!

    This would be hard to answer but you must be missing something the question is what are you doing and how is the document set up and then the really important question what are doing wrong. Which I know you want us to tell you but without knowing what that is we cannot tell you what not to do.
    If there is something you can tell that might give us a clue perhaps we can help.

  • Can't open multi-page illustrator file

    I'm on a mac. I have Illustrator CC. I'm trying to open a multi-page .ai file, and I get the dialogue that usually happens when you're trying to open a non-illustrator multi-page pdf. :
    here's a screenshot:
    http://grab.by/yNEg
    when I do a get info on the file, it says Saved As v.15 Created by v.15.0.0
    How can I open this file and get all the artboards without running a script? I want to retain all the text formatting.
    thanks!

    That usually happens when files get corrupted and only the PDF part of the file is still intact.
    Did you perhaps save it directly to or open it directly from a server?

  • Slow Illustrator Multi-Page PDF Export + Alternative Solutions

    Hello everyone,
    I have a recurring job that requires 50-60+ small illustrations be placed into a few different layouts. The workflow I have set up right now is as follows: All of the illustrations are drawn in one Illustrator file with multiple page tiles. This file is exported as a multi-page PDF and placed in InDesign layouts. One main problem with this system is that it takes a long time to export 60+ page tiles from Illustrator.
    I'm totally open to any alternative workflow solutions or recommendations someone might suggest, but there are a few reasons why I've chosen the multi-page PDF approach. The Illustrations share global swatches and symbols and graphic styles and sometimes these items need to be tweaked. Editing everything in one file is faster than opening, changing, and saving 50-60 individual Illustrator files. My client often needs me to make alterations to the illustrations, and sometimes these Illustrations appear on more than one page and in different layouts. Using the one multi-page PDF helps everything stay nice and consistent across every layout and every page.
    If anyone has any suggestions for how to speed up the Illustration export or alternative workflow recommendations, I'd love to discuss them.
    Thanks!

    As Scott said, the multiple artboards in CS4 are the most efficient way to do that and upgrading sure will help to streamline your workflow. Your problem is that each element needs to be stripped, possibly flattened and other data removed when creating the PDF and that can take its toll. The only other way to do it IMO would be some script that takes each layer of your doc and converts it to an individual AI file or PDF. It may just not have any advantage at all - scripts can be slow if a lot is goingon and it still would take time to save and convert the files.
    Mylenium

  • Getting Page Count for a Multi-Page PDF file using Illustrator script?

    Does anyone know how to get the page count of a multi page PDF file?  I know you can then open each page using the PDFFileOptions (pagetoopen).  But I need to know up front how many pages there are to loop thru to open each page and process each page.
    Any Ideas?

    This script i did for photoshop:
    OK so lets do it working on WIN and MAC without any shell script.
    This solution is not the best but its working.
    I used Try catch to solve it.
    Only issue is that you should at least somehow know how many pages you expect in pdf.. this mean if you are working with books or flyers...
    Then set the maxPagesCount to that number.
    I am working with pdfs with max 20pages.. so i start open the 20 then 19 then 18 and when i am success i know the amount of pages.
    Its not the quicker way but its usable.
    var maxPagesCount = 20;
    var actPagesCount = maxPagesCount;
    var opts1 = new PDFOpenOptions();
    opts1.usePageNumber = true;
    opts1.antiAlias = true;
    opts1.bitsPerChannel = BitsPerChannelType.EIGHT;
    opts1.resolution = 10; //it will load faster the test page
    opts1.suppressWarnings = true;
    opts1.cropPage = CropToType.MEDIABOX;
    myFunction = function () {
      try { 
          app.displayDialogs = DialogModes.NO;
          var fileList = openDialog();
          for (i = 0; i < fileList.length; i++) {
            actPagesCount = maxPagesCount;
            getPagesCount(fileList[i],maxPagesCount);
            alert(actPagesCount);
      } catch (exception) { 
        alert(exception);
    getPagesCount = function (checkFile, lastPageID) {
      try {          
        for (var checkPage = lastPageID; checkPage > 0; checkPage--) {
          opts1.page = checkPage;                    
          var docRef = open(checkFile, opts1, false);                  
          docRef.close(SaveOptions.DONOTSAVECHANGES);                  
          actPagesCount = lastPageID;                  
          return;                  
          checkPage=0;                              
      } catch (exception) {
        // Look for next page        
        checkPage--;        
        getPagesCount(checkFile,checkPage);

Maybe you are looking for