SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2003
    Location
    Urbana, MD
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    desperate for Acrobat JS help

    In case you didn't know, you can script functionality in nearly all Adobe products with an ECMA-script based language (that's JavaScript). I'm working on this piece to append PDF files together and am stuck with an error that I can't explain. So I'm posting here in case anyone's experienced this (the Adobe forum is dead, or I wouldn't be posting here...)

    Thanks for reading/looking.

    I've created a JavaScript batch process I'm running to append all fileB's to fileA's in a directory. Basicially, I am parsing the filename to determine if the file is of type fileA and then I attempt to insert fileB into it (these are all using a common naming convention, so it's not difficult). The problem is that my insert is failing, and usually only inserts one page even though it should insert the whole document of fileB.

    I get something like this in the console:

    uncaught exception:Batch [doc title]:Exec:78: Global.insertPages Acrobat Raise: ===> A file error has occurred.
    filename_ext.pdf

    Any ideas? According to the docs I should be able to do this no prob:

    this.insertPages(-1, NewFileVar);

    and not specifying the start and end range of the inserted doc should insert the whole thing. But it never does.

    Thanks,
    Doug

  2. #2
    SitePoint Member
    Join Date
    Mar 2003
    Location
    Urbana, MD
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the help. Eventually found there was a bug in the application (Acrobat) with the insertPage method, and implemented a hack-solution to get around it. Only to run in to other limitations later. Acobat really sucks to develop with, even though it is cool enough to use JavaScript...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •