These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

AIR and PDF

Pierre
Registered: Sep 15 2008
Posts: 5
Answered

hello

I want to send data from AIR to PDF.
I found an very interesting example :
http://codemoiunmouton.wordpress.com/2008/05/10/air-parle-au-pdf-les-sources/
but when i try the code i have an error.
I spend severals hours to find where the error come from, without result.

Can someone help me please.

Best regards,

Pierre

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This example is a PDF being displayed in an AIR app. Air cannot contain the PDF directly, instead, the PDF is in an HTML page, in an Object tag. Air displays the HTML, which loads Acrobat and displays the PDF. Air talks to the HTML container which talks to the PDF throught the HostContainer object in Acrobat JavaScript.

So, what exactly is your problem? What code are you using? What is the error message?

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

Pierre
Registered: Sep 15 2008
Posts: 5
Hello,


Thank for your prompt response.

I understand the exchange operation between AIR and PDF, thank.

I have installed flex3 and AIR 1.1 on my computer.

The error that appears in the message is generated by the line 23 of file DocRight.htm…."!Error! ".

* Communication between : AIR to PDF
Data can be entered in the left side, but no data appear in the PDF document.

* Communication between : PDF to AIR
Data entered in the PDF document are not displayed on the left side.

On his blog the developer said: "I confirm ... I think this error come form the AIR 1.1 UPDATE. They have changed a rule of communication between the containers "

My problem is to resolve the communication problem in order to have this example that works with air 1.1.

I don’t know to solve this problem. This is why, i need your help.


Best Regards
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
It seems that you are using code that I developed a long time ago. Where did you get this sample? And what do you mean by "On his blog the developer said:". Who are you talking about?

Line 23 of the htm ls the first line of the OnMessage event code. If this is true, then the HTML is recieving the message from the PDF.

You also said that the name of one of the HTML files was "DocRight.htm", this file is intended to be used as a frame for "brwsr2acroJS.htm". Do you have all of the html files for this sample?

There are updated versions of this example at:
http://www.windjack.com/resources/howto.php

Look for the "IE Browser/Acrobat intercommunication" link.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

Pierre
Registered: Sep 15 2008
Posts: 5
Hello thomp,

Thank for your answer.

First looking to your code, in find it as example modified in order to work in AIR application in :
http://codemoiunmouton.wordpress.com/2008/05/10/air-parle-au-pdf-les-sources/
and
http://blog.digitalbackcountry.com/?p=1001
this two people work for Adobe.

I have all html field, and your example works, tried it with dreamweaver .. no problem.
But my idea is to load your exemple in an AIR application like the exemple explain in :
http://codemoiunmouton.wordpress.com/2008/05/10/air-parle-au-pdf-les-sources/
but when i send information from AIR to PDF, no result only a message "error". Some one, have the same problem and ask the same question in MIchael CHAIZE but he gives no answers (prehaps because it's your code).
I'm a beginner and i don't find answers to my problem adn i don't want to use LiveCycle.

Can you help me, please ?

Best Regards