Form Guide in an AIR app with a PDF

Here is a sample that is to be taken “as is”, as just a basic sample of how to make an AIR app that has a Form Guide in it that can share data with a PDF that is also in the AIR app. It was created by one of my collegues just to see if it could be done. It is not an officially support solution at this time, but numerous people are starting to build apps of this type. Please keep that in mind. You can retieve your Guide SWFs to use from the temporary Preview directory.
This is a Flex Builder 3.0.1 project zipped up.

Download file

NOTE: TOO MEET the USER LICENCE AGREEMENT for Guide Builder, you must use LiveCycle Forms Service to generate the Guide SWF. The use of the Designer Preview is for Development purposes only.

To get just the SWF returned (instead of the html with callbacks) from the normal LC FormGuide request add/set “cb=1” to the request.

The GAClientRuntime.swc and XFAModel.swc Library files can be found in LC Designer’s install directory under plugins/GuideBuilder, the project will need to point there on your system.

15 Responses to Form Guide in an AIR app with a PDF

  1. Randy Taylor says:

    Once in while you really can find what you have been searching for!

  2. Randy Taylor says:

    I need the enrollment.swc[Trevor – You do need to change the Library SWCs that are refernced to be from the Guide Builder install directory. there is no enrollment.swc required.]

  3. Randy TaYLOR says:

    So even if I get this to work. I can’t use guide builder to produce a swf which I can deploy as a standalone application..Per the license agreement?will adobe come out with a disconnected solution.[Trevor’s Response – Nothing I stated said it had to be connected. To paraphrase, The Licence agreement states that the LiveCycle Server must be used to generate the Guide SWF, once generated the agreement is met. It does mean that a licenced copy of LiveCycle Server is currently required. Adobe is looking to provide, over the long term (I have no time frame available to offer), a Cloud version of LiveCycle, is that closer to what you would require.]

  4. Randy TaYLOR says:

    So even if I get this to work. I can’t use guide builder to produce a swf which I can deploy as a standalone application..Per the license agreement?will adobe come out with a disconnected solution.

  5. Randy Taylor says:

    Because of the nature of the business I am developing for, the field agents need to be able to operate the form guide on location with out the use of an internet connection.It must be truly standalone.I am still trying to get the sample to work, having issues getting it to compile.By the way I have noticed that the save print toolbar is removed from just regular Swf produced by the guide builder. Is that by design?I appreciate your efforts.

  6. Trevor Ward says:

    Randy,Please see the Blog entry about SDK compatiblility. It may help with you compile issues.The “toolbar” visibility is controlled by the Wrapper layout and based on the Guide being able to establish communication with the PDF. The sample Air app is not using the regular Form Guide control over the pdf, it is the Air app brokering it. If you look at the FormBridge XFO code you can see what the format of the message you need your Air App to send the PDF to get it to save or Print. I will create a version of the Air App the mimics the Guide online behaviour, but I can’t say when I will get to it.

  7. John Nesbitt says:

    Thanks Trevor!This is exactly what we’ve been after since 8.2 was released (and AIR became a possibility).The potential is extraordinary – especially once people know you can put native Flex code right into an XFA form!Thanks again,John.

  8. John Nesbitt says:

    Randy,I just noticed your comment that your field agents can’t be connected to the Internet and therefore this is of no use to you.This could not be further from the truth. What Adobe means is that you still need to buy the LC Forms product in order to create the SWF (i.e. you can’t get away with buying a $500 standalone version of LC Designer to produce the SWF – in theory it will work it’s just a violation of the license agreement…and rightly so, this technology is worth a lot more than $500!).The AIR apps demonstrated by Trevor do not use LC Forms real time to produce the SWF – it’s all embedded at compile time and distributed within the AIR application, so indeed your field agents with no Internet connection can just double click the icon on their desktop and the form will load.Probably the easiest thing to do (if you already have LC Forms) is to use FormsIVS – just upload your XFA form, set the callback request parameter as described above, then capture the output (SWF). Once you have that, you can just add it to the AIR project.John.

  9. Randy Taylor says:

    How much?

  10. Randy Taylor says:

    I followed the instructions and I still can’t seem to make the sample work: copied the xml file down to the guide builder flexsdk directoryWhat version of flash player is required I keep getting flash errors .any help would be nice?

  11. John Nesbitt says:

    Randy,Depends on how many users. You can buy a per user license (min of 100 users) for about $US 32,500.If you need more users than that, you can buy a per CPU license for approx $US 50,000.You would, of course, need to consult an Adobe reseller / partner for more accurate prices, but this is just a ball park.It may seem like a lot, but for what you get with Form Guides (that you would have to otherwise do from scratch) I believe is well worth it. Form Guides give you a great platform and framework to develop with and gives you the ability to do form fill and print layout using the same tool (and same business logic – you don’t have to redo your show / hide logic between the form fill and print version of your document).John.

  12. Randy Taylor says:

    It’s working yes..now All I need is 50,000 to use lc form service to generate form guide swf.

  13. Randy Taylor says:

    Trevor You said that you would develop an application that uses the same control over the Pdf as the form guide control have you made progress with this as yet .I would really like to see that in action.and do you recommend a good flex book

  14. Randy Taylor says:

    Thanks Trevor! and John

  15. Gaurav says:

    Trevor : How do I make the swf to run standalone in disconnected mode?Also is it possible to partially fill the swf generated from Guides, extract the xml (user filled data) and save it in disk, and later when the user opens the guide (inside air) , the swf some how maps the xml to corresponding fields? (mimic saving form guides- swfs)[Trevor] – in the options for the service set “cb=1”, which will return just the SWF (not the html).NOTE: the Form Guide uses the html to pass the data to it, you can not embed the data in the SWF. To put get the Data out of the running Form Guide call:Wrapper.instance.getData(); //returns xml stringWrapper.instance.setData(xmlDataString);