Writing JavaScript for PDF on the cheap

Sep 02, 2014 13:41

So I'm creating this form using Scribus 1.4.4, and writing JavaScript for the various buttons. What I want to do is be able to extract and save one of the (three) pages under its own name. Ideally, the extracted page has none of the document-level JavaScript of the original document.

I would settle for being able to export and import the data on the given page (and probably some data that isn't exposed). (I haven't looked into the datablob object yet; if this fails, that's what I will do.)

I don't have access to Adobe Acrobat or Adobe Acrobat Pro, and there's no way to guarantee that potential other users will, either.

What are the possibilities? I see a couple:
  • Maybe saving the page as an object blob will work. Something to look into.
  • Maybe writing the restricted functions and instructions to put them into the correct folder on the target system will work. I'm not sure if that actually gives Reader the correct permissions, but it might.
  • Write the whole thing in Java and export the PDF when necessary. I can see the utility of the third one, but it means going beyond what I currently know (the syntax for Java) and actually educating myself about the libraries and user interface stuff.

Anybody else got ideas or arcane knowledge that they'd like to share?

Posted on DreamWidth at http://doc-lemming.dreamwidth.org/200800.html. Try this link to reply over there.

javascript, pdf

Previous post Next post
Up