Page 1 of 1

RR and PDFs

Posted: Tue Apr 11, 2006 4:40 pm
by blingbling
Hi,

It looks like some health insurance companies are accepting electronic claims in the form of fill-in-the-blank PDF documents. Not a bad idea, really.

I guess fill-in-the blank PDF documents have named fields, and are proably scriptable, but I don't know anything about it.

Is it possible to write a RR script that would export data to the named fields in a PDF document? If so, maybe there's a web page that explains how, or maybe it's in the docs somewhere.

A clue or two will be sufficient for now.

Thanks in advance,


Tim

JavaScript, Yes; Rev, Not Yet

Posted: Tue Apr 11, 2006 6:53 pm
by revdan
PDFs are JavaScriptable and using Java

JavaScript, Yes; Rev, Not Yet

Posted: Tue Apr 11, 2006 6:54 pm
by revdan
PDFs are JavaScriptable and using JavacScript, you can definitely supply information for fields on a form completion PDF application.

As far as I know, nobody has yet tackled this issue in Rev. Interesting project, though. I don't know if Adobe publishes the API for forms completion but dissecting their JavaScripts might provide enough data.

Posted: Tue Apr 11, 2006 7:27 pm
by marielle
On the acrobat api, you may find this useful
The full Adobe® Acrobat® SDK contains the documentation, headers, sample code, and tools developers need to build plug-ins, integrate Acrobat Standard, Acrobat Professional, and Adobe Reader into another solution, or automate processes.

Posted: Tue Apr 11, 2006 7:31 pm
by marielle
Otherwise, try Planet PDF forums/fora. They have a topic on PDF JavaScript.

Posted: Tue Apr 11, 2006 11:03 pm
by Dave Cragg
There is an fdf file format used for PDF forms. I used this many years ago for automatically filling out PDF forms. I don't remember the details, but I know it wasn't easy. There is more information at Planet PDF.

http://www.planetpdf.com/mainpage.asp?WebPageID=338

Posted: Wed Apr 12, 2006 1:19 am
by Obleo
You might want to look into the AFPL Ghostscipt project.
http://sourceforge.net/projects/ghostscript/

Beyond what they post at this site, as long as ghostscript is present on the users system it can be accessed by shell scripts also. Under "img-ps" .

Posted: Wed Apr 12, 2006 8:50 pm
by Timothy
Great! Good start, very helpful.

I know a teensy bit about javascript. It's just text, and RR makes it easy to cobble bits of text together. The needed javascript probably wouldn't be very difficult, either.

The missing bit for me, at this point: If I can get RR to produce the javascript I want, can I get the javascript to execute within RR? How is that done?

Thanks even more,

Tim

Posted: Thu May 04, 2006 7:42 pm
by mcgrath3
After installing the javascript

In Rev you do:

do field "script to run" as Javascript

or put it into a variable and do:

do tVar as Javascript

Posted: Thu May 04, 2006 7:45 pm
by mcgrath3
Oh yeah and to get the java script to exchange or replace elements use the:

replace "<property>" with tProperty in tTheScript

So I store the javascript in a custom property and put that into tTheScript then I have <property> already in the Javascript. Then in Rev I put the replacement property in tProperty and run the line before doing the script.

Tom