Results 1 to 6 of 6

Thread: add javascript to pdf

  1. #1
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default add javascript to pdf

    What post process software is there to add javascript functionality to pdf's?

  2. #2
    Join Date
    Oct 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    If you have Adobe Acrobat Professional, you can embed JavaScript into almost any custom action for an interactive element, including Page Open/Close, and in buttons.

    In any element that accepts an Action in its properties window, drop down to the Run JavaScript in the Actions list and either type in your JS code in the resulting window or load in a .js file you already have made.

  3. #3
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    Thanks for your reply but it isn't really an option for me; I just need to add javascript to some pages and using a gui would be very time consuming. I should have stated that i want a command line tool. The pdf's are also created from command line.
    Have you any experience with the sdk's? I see 7.05 and 8.1 are now free of charge.
    If no one else will come up with an answer that will be my best bet.

  4. #4
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    I think i'm going to use Itext

  5. #5
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I know this is a very old thread, but here is one possible option to embed Javascript into an existing PDF

    http://blog.rsmoorthy.net/2012/01/add-javascript-to-existing-pdf-files.html

    Moorthy
    Last edited by djr33; 01-20-2012 at 06:48 PM.

  6. #6
    Join Date
    Mar 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Have a look at this hiqpdf.com library
    This is a nice demo (hiqpdf.com/demo/PdfOpenAction.aspx) about how to set an action to be executed when the PDF document is opened. There are 4 possible types of actions: execute a JavaScript, go to a location in PDF, submit PDF document form and reset PDF document form. Have a look
    Last edited by djr33; 03-10-2012 at 07:12 PM.

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
  •