RR and PDFs

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
blingbling
Posts: 11
Joined: Mon Apr 10, 2006 5:39 pm

RR and PDFs

Post by blingbling » Tue Apr 11, 2006 4:40 pm

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

revdan
Posts: 21
Joined: Sat Apr 08, 2006 5:59 am

JavaScript, Yes; Rev, Not Yet

Post by revdan » Tue Apr 11, 2006 6:53 pm

PDFs are JavaScriptable and using Java

revdan
Posts: 21
Joined: Sat Apr 08, 2006 5:59 am

JavaScript, Yes; Rev, Not Yet

Post by revdan » Tue Apr 11, 2006 6:54 pm

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.

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Tue Apr 11, 2006 7:27 pm

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.

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Tue Apr 11, 2006 7:31 pm

Otherwise, try Planet PDF forums/fora. They have a topic on PDF JavaScript.

Dave Cragg
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 11
Joined: Sun Apr 09, 2006 6:36 am

Post by Dave Cragg » Tue Apr 11, 2006 11:03 pm

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

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Location: Chicago
Contact:

Post by Obleo » Wed Apr 12, 2006 1:19 am

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" .

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Wed Apr 12, 2006 8:50 pm

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
It's better to be happy and rich than poor and sad -- W. C. Fields

mcgrath3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 149
Joined: Thu Feb 23, 2006 8:49 pm
Location: Bethel Park, Pittsbrugh, Pennsylvania USA
Contact:

Post by mcgrath3 » Thu May 04, 2006 7:42 pm

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
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net

mcgrath3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 149
Joined: Thu Feb 23, 2006 8:49 pm
Location: Bethel Park, Pittsbrugh, Pennsylvania USA
Contact:

Post by mcgrath3 » Thu May 04, 2006 7:45 pm

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
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net

Post Reply

Return to “Talking LiveCode”