Reading Data into a PDF form with cfpdfform and cfpdfformparam

I have been trying to read data from a query into a PDF form. I have the application setup to generate a new pdf file for every record in the database table which is working perfectly, but when I try to have the application pre-populate the form fields in the pdf form they remain empty. I have included a snippet of the code that creates the PDF documents. I am using Adobe LiveCycle Designer 8.0 to create the PDF form.
Snippet Example:
<cfoutput query="renewals">
<cfset new_file = "#reportnumber#.pdf" />
<cfpdfform action = "populate" source = "beta.pdf" destination = "#new_file#">
  <cfpdfformparam name="Legal_Contact_Name" value="#LegalContactName#">
</cfpdfform>
<cfpdf action = "write" source = "#new_file#" destination = "#new_file#" flatten = "yes" overwrite  = "yes" />
</cfoutput>
All help is greatly appreciated...

I'm just glad I might be of any help.
First, make sure the image is embeded as a base64 encoded string in the xml structure you're working with on your form you've built in LiveCycle Designer.
I do this by reading the image file and outputing its content as a base64 string:
<cffile action="read" file="#expandPath('Path/to/your/image/file/BC.TIF')#" variable="imgObj" />
<img>#toBase64(imgObj)#</img>
Your PDF form should be bound to this 'img' field from your xml structure in LiveCycle Designer.
This works perfectly and the image from the xml is indeed displayed in the PDF form generated with cfpdf.
BUT, from the moment you convert the pdf form to static pdf document, the image will be gone - the dynamic text remains.
Note:  I never further investigated why the image disapears once the pdf form is converted to 'static' pdf.  Thinking about it now, it might have been an incoding issue.  The toBase64() function in ColdFusion has an optional "Encoding" argument, may be by playing with the encoding the image might finally 'survive' the conversion to static pdf.
Good luck.
note: this will populate the pdf form from your xml structure in ColdFusion.
<cfpdfform action="populate" source="/path/to/LiveCycle_generated_templateForm.pdf" xmldata="#your_xml_structure#" destination="/path/to/result.pdf" overwrite="yes" />

Similar Messages

  • Allow reader users to save pdf form with data

    I want to create a form that an adobe reader user can open and save a copy as a pdf with the data in the form. I know that requires reader extensions - what i can't seem to figure out is if I already have this included and how to do it. I have LiveCycle Designer ES 8.2 - which is the download I end up at when searching LC with reader extensions.
    Does anyone have instructions on how to do this or know whether that functionality is available in the version I'm running?

    You can add the Reader Extesnion right to save the form with data locally in two different ways.
    1. In Acrobat Pro open the form and under the Advanced/Extend Features in Adobe Reader will walk you through a wizard. Once the wixard is finished, save the file and use that one. This technique is limited to 500 users by licence.
    2. LiveCycle Reader Extensions Server has a User Interface that allwos you to pick the rights you want. There are no luser imitations to this option.
    If you do not have either, option 1 is a lot simpler. You can download a trial copy of Acrobat Pro and try it.
    Paul

  • How to read data from writable PDF Form?

    Hi,
    I need some help for the web site that I am working on.
    This is asp.net website. Client is requesting to provide writeable PDF forms on this website for download.
    These forms will be downloaded by customers, they will fill in the required data on these forms save it and upload the forms back on the website.
    Once uploaded we need to read whtever client has written in these forms and update in the database (SQL server).
    I have been going through adobe web site and lot of other web sites to understand this concept (as i have never done this).
    What I understood is, with Adobe LiveCycle designer and forms we can create writeable forms.
    However I have not got any idea or seen any documentation on how do I read the data that user has typed on these forms.
    This reading the data from pdf and saving into sql server, I have to do it in asp.net app.
    Could anyone please help me understand how to achieve this.
    Thanks a lot for you time.

    How do we do that?
    Just to clarify myself, I am not putting any button on PDF to invoking submit action from PDF. I am allowing user to upload the pdf and they click submit button on my aspx page.
    Are you saying that when user submits the aspx page there is a wasy to retrieve the data in the form of XML or name/value pair on this aspx submit? if so please send me some pointers/examples or let me know how to do this? Is there any additonal tools/software that we will need to buy from adobe for this?
    thanks for you time!
    Praxo

  • How to: Create a master form that auto-fills data into other pdf forms?

    I hope someone can please help me.  I have about 15 PDF forms that all require similar data entry (name, address etc). Can I create a master form that we fill in once per client, and then auto-fill in the matching data on the 15 forms? 
    I am not looking for an online solution as the information is highly sensitive. 
    I have already created a form in Acrobat X Pro with the 'master data', and created the (15) forms with identically named fields.  How I link the forms now to the master, I cannot figure out (after much searching).
    I have read similar questions on the same topic but have not found any answers.   I hope this time someone can please help.
    Many thanks in advance.

    Thank you!  I had just figured out how to export the data from the master as an FDF file and then import it to the other files.  I'm afraid I don't understand scripting to automate the process across multiple files.  To you mean with java script? 
    I've also thought about combining the forms, once we know which ones the particular client will need.  I have to see how it works in practice for my colleagues who will be using them.
    Thank you again.

  • Using importdata to import xml data into dynamic PDF form

    Hi again,
    Me and my colleagues have a problem using the importData service to import some xml data into an empty PDF form (represented as an XFA input variable).
    In the server log I get the error that Only XDP data is supported for XFA forms, however I only have the xml data and not the entire xdp available.
    Is this really not possible to to (like importing xml data to a form is possible in the Designer when creating forms).
    I hope the scenario is understandable
    Sincerely
    Kim Christensen
    Dafolo A/S
    Denmark
    PS: During the various projects I am working on I keep running into problems...however I am totally new to LiveCycle so I consider this very informative learning steps and appreciate all your help :-)

    Hi again,<br /><br />I have been experimenting a little with both the renderPDFForm and importData services. However I don't seem to be ble to make them work as I  need them to.<br /><br />My scenario is simple, I have one (call it a template xdp/PDF form) and lots of data in xml files (around 1000), that I need to import into the template. Therefore I have set up a "Watched Folder" to take the xml as a document (I guess this is a requirement) and then I need either the renderPDF or importData services to import the xml data into the template.<br /><br />I would like to know how I should setup the services to make this work.<br /><br />When I try to use importdata I setup the following:<br /><br />PDF document: set to be the template i need to import the xml to)<br /><br />Input data: the document variable (an xml file) that is passed to the   Watched Folder<br /><br />Data merged PDF: set to an out xfaform<br /><br />When I do this I get an Coercion error in the server log:<br /><br />2007-11-15 13:27:05,324 ERROR [com.adobe.workflow.AWS] stalling action-instance: 1506 with message: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.<br />     at com.adobe.idp.dsc.util.CoercionUtil.toDOMDocument(CoercionUtil.java:656)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:878)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:803)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractDataTypeRuntimeHandler.coerceFrom(Abs tractDataTypeRuntimeHandler.java:64)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractComplexDataTypeRuntimeHandler.getNode (AbstractComplexDataTypeRuntimeHandler.java:47)<br />     at com.adobe.workflow.dom.VariableElement.setBoundValue(VariableElement.java:93)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:729)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATEx ecutionContextImpl.java:335)<br />     at com.adobe.idp.workflow.dsc.service.SetValueService.execute(SetValueService.java:46)<br />...<br />Caused by: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document state="passive" senderVersion="3" persistent="false" senderPersistent="true" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.16.10.125" callbackId="0" senderCallbackId="7" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="8039" contentType="application/xml" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xml version="1.0" encoding="UTF-8"?><br /><form1><br />  <sub_BlanketTop /><br />  <sub_SubjectTop><br />    <f...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</s enderPullServantJndiName><attributes file="c:\NCRConvert\ProcessForm\stage\Wx450d4b32843a0b0bcb8ef99e\NCR-00564_dXAE3soH.xml"/ ></document> of type: com.adobe.idp.Document to type: interface org.w3c.dom.Document<br />     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br />     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)<br /><br />However it is possible to manually import the xml data in Acrobat Professional without any problems.<br /><br />When I use the renderPDFForm with the following settings:<br /><br />Form to render: literal value that points to the template<br /><br />Form data: document variable from watched folder (xml)<br /><br />Content Root URI: repository://<br /><br />With these settings I also get a coercion error, however it does not seem to be exactly the same.<br /><br />Sincerely<br />Kim

  • When merging data into a PDF form, can it create a new form for every record in your data set?

    I have a vendor database that I want to use to populate a pre-created PDF form in Adobe Pro XI. I figured out how to rename the form data fields and how import the data from my data set but can't figure out how to have it create another copy of the form for the next record in the data set.... if its even possible. Any help is appreciated!

    This can be achieved with a mail-merge type script.

  • Filling out a pdf form with preview

    I need to fill out some government forms which are of course in a pdf format and they want them typed.  Before i go looking for a typewriter at the antique store, isn't there a way to do it and print it retaining the forms format?  Preview will allow me to do about 3 lines and then stops allowing input.  I've tried the google crap and from there the apache odt crap.  Tried it on a PC too with growing frustration and zero accomplished.

    Preview will allow me to do about 3 lines and then stops allowing input.
    That is quite strange. I fill out pdf forms with Preview, and it allows me to put as much text in as I want. I wonder if the problem is something inherent in the particular form you are trying to annotate. You might try Skim ( Download Skim for Mac - PDF Reader and note-taker for scientific papers. MacUpdate.com ) which is an app I used to use to annotate pdfs until I discovered that that functionality was already present in Preview. I don't know if you can post that form here or elsewhere and I could try to annotate it with Preview.

  • Populating a PDF form with database data

    I would love to know how (if possible) to populate an Adobe PDF form with data pulled from an Access database.
    Background
    I have a registration form already created using Adobe LiveCycle which is used by people to fill in their details.  With a built-in xml schema, the user saves the form and sends them to me.  I extract the data into an xml document which I can then import in an Access database using VBA code.
    The Need
    When it comes time to re-register, much of the original data provided by the user has not changed.  Rather than ask them to fill out the form all over again, I would like to send them their original data and they can update whichever fields they need to.  With the xml schema built into the form, I would love to turn this form into a two-way avenue for both importing and exporting data.  Is this possible?
    Any assistance in this matter would be greatly appreciated.  Please let me know if I have not provided enough information.
    Brett

    You can connect the form to the DB using anODBC connection. This functionality comes as part of Acrobat but the form must be Reader Extended by the full LiveCycle Server version of Reader Extension to allow this in Reader. In your case, if your system is the only on ethat will interact with the DB then this might be a viable solution (but you woudl have to use Acrobat). This solution woudl involve create an ODBC connection in your system then configuring the form to make use of that connection.
    Does that make sense?
    Paul

  • How to open a pdf form with fdf data

    Hi all,
          I am working on a new project. In that, I have to load a PDF contract form with FDF data on Internet Explorer Window.
    I don't know how to do it. Actually I tried using this format on the URL (while loading the respective page)
    http://www.example.org/pdf_file_name.pdf#FDF=http://www.example.org/fdf_file_name.fdf
    But it opened as an empty pdf document. . Actually I need it with the fdf data.
    Can anyone know any other way to do this?
    Or is this not possible to open a pdf form with fdf data in a browser?
    Thanks in advance
    Annamalai

    @ Bernd. It still opens a text file
    Here's my FDF file sample
    %FDF-1.2
    %âãÏÓ
    1 0 obj
    <<
    /FDF << /Fields
    <</V (07/22/2009)/T (Loan_Note_Date)>><</V (22.29)/T (Loan_AnnualPercentage_Rate)>></V ()/T (Seller_ESignatureArea1_Date)>><</V (GA Dealer)/T (Seller_Signer_FullNameTitle)>><</V ()/T (ThirdParty_ESignatureArea1_Date)>>
    /F (MARSMFLZ.pdf)/ID [ <1f0b6b55f345db39e8246247138fe562><e960588530b0d06d35cd618b34d4c314>
    ]>>
    >> endobj
    trailer
    <<
    /Root 1 0 R
    >>
    %%EOF
    (I have uploaded the related pdf file before.)
    Just now I got an idea to use WScript (the code is written in javascript)
    ws = new ActiveXObject("WScript.shell");
    ws.Run('"AcroRd32.exe" "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf"', 1, true);
    this opens my fdf document in Acrobat reader using command prompt.
    I have a doubt now, can i use some string in place of "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf" in the above command?
    I mean something like fdf_file = "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf"
    and replace ws.Run('"AcroRd32.exe" fdf_file,1,true). I tried it but it doesn't work Any idea's? Since the path will not remain the same always. So i need to change it

  • How to Pass XML Data to a PDF Form and Load it into form fields

    I have xml Form data in a string. I would like open a programatically launch a pdf document and pass the xml data as one of the parameters and this xml data needs to load all the form fields.
    Any Idea as to how this can be done?

    I have the same requirement as Daminu, but from the research I have been doing it seems your reply is only partially true. 
    If your PDF is an XFA PDF form, with Reader Extensions enabled, and you want to keep the Reader Extensions functionality for a user to use after your programmatic manipulation, then neither of these tools will work (FDFToolkit or iText).
    Upon the user opening the file once it has been programmatically modified, the user will see the following:
    From what I have read, this requirement can only be fullfilled by use of LiveCycle Reader Extensions Server?  Please confirm?

  • Pdf form with fields ppl can type into

    I have a pdf form with fields that are not able to be typed in. How can I edit them so that ppl can type into the field?

    Hi courtneyp58664902,
    I would recommend you to follow the steps detailed on the page associated with this link (http://wwwimages.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe-acrobat-xi-con vert-forms-into-fillable-pdf-c… ).
    I would recommend you to Save the pdf with reader rights enabled [ File -> 'Save as other' -> 'Reader extender PDF' ->  'Enable More tools ( includes form fill-in and save)' ].
    Please let me know if you face any challenges or need any further assistance.
    Regards,
    Rahul

  • Filling PDF Form with XML data file

    Hello everybody.
    I need help.
    I created a form with LiveCycle Designer. I filled it and generated a XML data files. Now, I would like to fill the same blank PDF form with this XML data file.
    I know that I can do it with Adobe 8.0 but I must do it in an C# / .NET application that I have to create.
    (Forms I'm creating are not for me, I create the forms. Client uses them form but he don't have Adobe Acrobat 8.0, so he can't realise the automatic PDF filling with Adobe Acrobat 8.0)
    So I am looking for help with ".NET" "COM" or other library to help me to do it. If someone has other idea just give it.
    Thanks for your reply
    Jean Pierre (sorry for my bad English)

    Hello Mike
    Thank's for your reply. I used XPAAJ and it works very well but my company his develloping software with C# langage.
    I tried to convert XPPAJ to C#, I did it with the Java Langage Conversion Assistant but "Adobe Library" included in jar files cannot be translated to C#/.NET library. So, I can't use it.
    I found some C#/.NET API on the NET but they are very expensive and my company don't want to pay. They want me to create my own solution with library given by Adobe when you buy Adobe 8. So I am looking for this library.
    Is there an Adobe LiveCycle Designer SDK to help me.
    Thank you in advance for your reply
    Jean Pierre (student developing with LiveCycle Designer)

  • Connect Pdf Form with Air Sqllite data

    Hi, i would like to save my Pdf Form localy but i know about restrictions of 500 users (legal notes after giving advanced user permission).
    I thought about do it in air which could have my pdf form inside. I thought that people after filling form with data could save it localy by connecting PDF Form (embed in air) with Air database. So people could save it offline and fill rest form date f.e. after few days to complete it later.
    I don`t know any more option to save my form data localy (offline) without installing localhost database. Air installing is simple but i don`t know how should i start.
    Please tell me how can i connect my PDF Form with Air database?
    EDIT:Do you have any tutorials of that?

    I read also about JavaScript method of sending data from PDF form to AIR with using PostMessage (communicate throw JavaScript & HTML Object embed). Now i don`t know is there more easy way to communicate with SQL lite Air local database than using PostMessage command (more direct as setting up File>New Connection>OLEDB Database in Livecycle Designer)?

  • Saving pdf form with extended Reader rights

    Hello,
    I want to save form changes without further confirmations in Reader version X ("Save" and not "Save as...").
    - If you use a pdf form with enabled Reader rights, you should be able to save any changes made in form field by using the Reader.
    - To save changes use "File / Safe" or press CRTL+S
    Result:
    - Save-as window will appear
    - After choosing save button you will be asked to overwrite existing file.
    Expected results:
    File should be saved without further confirmations! In Reader version 9 there was no problem with that.
    Does anybody had the same problem and found a solution?
    Regards,
    Christian

    OK, it seems to be a typical "it's-not-a-bug-it's-a-feature"-problem. But I found no way to avoid the overwrite question during saving. I noticed that the question appears only the first time when you click on the save button. If you do further changes in form fiels and click a second time on the save button the document will be overwritten without additional warnings. Maybe it's a feature to prevent users from overwriting empty forms by asking for a new filename and so on..
    However, we are using the reader in conjunction with a document management software and the overwrite warning disturbs our enterprise workflow. So the only insufficient solution for my problem is to downgrade all users to version 9 again.
    Hope next version of reader will be better in disabling unwanted features ;-)
    Regards, Christian

  • Merge data to existing PDF form?

    Been searching for this for awhile and cant seem to get an
    example that works. I have an existing PDF form with fields
    defined. What I need to do is populate this form with data from an
    existing query. I've seen examples saying that I need to export the
    FDF and use it in CF, but for the life of me, I cant find how to
    export it.
    Any help would be greatly appreciated!
    Thanks!
    -Ron

    There's a better way than using FDF's now that CF runs off of
    java. I remember reading on Ben Forta's site about a neat CF
    wrapper he wrote for using java objects to write to form fields on
    PDFs. sounds like they're bundling it into the next CF version. I
    wish I had a url for you, but I'm sure a few searches on ben's site
    should turn something up.
    P.S. its WAY easier to deal with than the FDF file format!!
    Hope that helps.

Maybe you are looking for

  • Export file formats from flash?

    Hi, I have an issue concearning existing file formats for export in Flash CS4. According to the user's manual in Italian I have found, http://help.adobe.com/it_IT/Flash/10.0_UsingFlash/WS0E26E472-1533-4297-A904-59476E8E1935.h tml available formts inc

  • Performance gain at merging parent/child - any experience?

    Table A has PK=(ID) and one attribute Type to tell in which child.tables to get the record. Child.tables B1, B2..B4 have PKy=(TABLE_A_ID_FK, By_ID) and other attributes(around 10, no LOBs or long strings) I know B1 is about to have 8mio recs, B2 will

  • SAP NetWeaver: SAP's Model-Driven Business Process Application?

    Hi All: I am a graduate student currently doing a research on 'Model-Driven Business Process Application'. I came across some literature about SAP NetWeaver during my research. SAP NetWeaver has generated a lot of interest in me and I would like to k

  • Bind Variables [SOLVED]

    Hello, I made a post yesterday and didn't solve my problems, but I'm getting a lot closer. I found two tutorials about bind variables and have been trying to follow them, but I am getting some errors and was hoping someone here could tell me what I'm

  • No value found for Text Variable

    Hi All, I have 2 different variable created on 0VERSION. One for user entry and second one is text variable with replacement path as "text". I have 3 different columns in the report. One is Restricted KF, based on user entry variable. Heading of this