Skip navigation

Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.

Mar 26, 2007 9:38 PM

  Latest reply: anand.padmanabhan, Feb 23, 2013 12:40 PM
Replies 1 ... 3 4 5 6 7 Previous Next
  • Currently Being Moderated
    Nov 18, 2011 8:55 AM   in reply to anand.padmanabhan

    I can't post the code on this site, because, XML doesn't display correctly.

     

    Visit the following site and send me your email address:

    http://www.nk-inc.com/support/sales/

     

    I will reply with the XFDF file you can inspect.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 8:57 AM   in reply to anand.padmanabhan

    you can also check out:

    http://fdftoolkit.codeplex.com

     

    FDFToolkit.net is open source, and uses iTextSharp technologies.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 9:00 AM   in reply to NKOWA2

    Ok, sent my email address

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 9:00 AM   in reply to NKOWA2

    I have done this with iTextSharp already. But, I want to try without using any third party library.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 9:17 AM   in reply to anand.padmanabhan

    I didn't get your e-mail yet, but, here's the example file...

    http://www.nk-inc.com/example.txt

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 9:19 AM   in reply to anand.padmanabhan

    mime should be:

      application/vnd.adobe.xfdf

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 9:38 AM   in reply to NKOWA2

    My xfdf is like below,

     

    <?xml version="1.0" encoding="UTF-8" ?>

    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">

    <fields>

    <field name="First_Name"><value>Jack</value></field>

    <field name="Last_Name"><value>Shephered</value></field>

    </fields>

    <f href='http://localhost:53296/Documents/8a754934-c983-4a50-b00f-d291be59aeaf. pdf'/>

    </xfdf>

     

    context.Response.ContentType = "application/vnd.adobe.xfdf";

    context.Response.Write(xmlData);

     

    It now opens up an empty PDF file in the iFrame without populating the data from xfdf file.

     

    Same XFDF file when imported manually from Acrobat, populates the data in the PDF file.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 10:26 AM   in reply to tarekahf

    HI Tarek,

     

    Could you please explain the differences between Acrobat and XFA forms? What is the benefit of going with XFA forms?

     

    Also, let me know the licensing & software required to create and maintain XFA forms from ASP.NET web application.

     

    I have static PDF forms, which i opened in Acrobat PRO 9 and converted to interactive forms. No special reason for going with Acrobat forms.

     

    Regards,

    anand

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 11:51 AM   in reply to tarekahf

    Thanks Tarek.

     

    Let me try to create a Livecycle XFA form. It looks like there is no special component required on the web server and client (other than adobe reader) required to process XFA form.

     

    Basically, I want to do the following,

     

    1. Upload the PDF form and store as binary in the database

    2. Retrieve the saved binary data and render as PDF in an iFrame in the browser

    3. While rendering the PDF, fill some of the form fields automaticallly with data in the database

    4. User can fill the remaining fields from the browser and click Submit button.

    5. The save PDF should be saved as binary in the database.

    6. User should also be able to download, print, reset the form.

     

    I have done all these things with Acrobat forms and iTextSharp.

     

    But, I want to remove the dependency on iTextSharp and create a custom code that does not depend on any third party libraries. Thats where the merging of XFDF and PDF came up.

     

    Do you have sample to fill data in Livecycle PDF form?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 12:33 PM   in reply to tarekahf

    Thanks Tarek. I have just downloaded the files from the link. I will go through it and get back to you.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 1:05 PM   in reply to anand.padmanabhan

    Just noticed that the PDF document contains a signature field, so, that shud also be supported...

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2011 1:45 PM   in reply to tarekahf

    Ok fine. actually, I'm planning to go with a third party component for digital signatures...

     

    Thanks for all the details, Tarek.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 18, 2012 8:03 PM   in reply to tarekahf

    Hi Tarek,

     

    I have a pdf file and on click of SUbmit ,I want to submit it to a webservice which has to save the entire PDF.I need to use Dot Net for teh webservice.Sample of the code will really help.

     

    Thanks and Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 18, 2012 8:19 PM   in reply to Leena Jain123

    Add a "HTTP Submit Button" control in the PDF form.

     

    In the submit URL property of the button, set a URL like http://localhost/PDFManagement/PdfProcessor.aspx?SubmittedFormPart=1 and set the "submit as" property for the button as PDF.

     

    In the PDFProcessor.aspx web form page load event handler, you can get the full PDF using the below code,

     

    if (Request.QueryString["SubmittedFormPart"] != null && Request.QueryString["SubmittedFormPart"].ToString() == "1")

                {

                    Stream fs = this.Page.Request.InputStream;

                    BinaryReader br = new BinaryReader(fs);

                    Byte[] bytes = br.ReadBytes((Int32)fs.Length);

                }

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 18, 2012 11:05 PM   in reply to anand.padmanabhan

    Thanks Anand,

     

    But when i choose Http Submit Button", I do not get an option to Set the Submit As Property in Designer9.Am i missing something?

     

    Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 8:23 AM   in reply to Leena Jain123

    Add a Button objectUntitled.png

    like in the above screen shot.

     

    Set the control type as submit.

     

    You will see a submit tab.

     

    In the submit tab, you will need to set the submit to URL property and submit as property.

     

    This will work in livecycle designer

     

    if your form is acrobat form, steps will be slightly different

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 9:09 PM   in reply to anand.padmanabhan

    Thanks Anand,

     

    I could achive the desired functionality.

     

    Only one issue , after the PDF is saved it opens a blank PDF, is there some script with which we can have the same PDF in view?

     

    Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 9:16 PM   in reply to Leena Jain123

    Do you display the form online? Where do you store the PDF? in database or file system?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 9:24 PM   in reply to anand.padmanabhan

    There is a ASP page on which the form is opened ,then we click Save and the form gets saved in Document Repository(Using Sharepoint Portal).After clicking teh submit, a blank PDF with the title of that URL( asp url) is opening.

     

    Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2012 2:45 AM   in reply to tarekahf

    Thanks Anand and Tarek..

     

    I was able to achieve this.I had to have a ASP Page at the Server end instead of a webservice and submitted the Form as PDF to it which inturn saved the file to a specific  server location.

     

     

    Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 6, 2012 12:20 PM   in reply to tarekahf

    Hi Tarekahf,

    I am trying to automate the PDF submission process for the organization.

     

    I have an iframe in which I am displaying the fillable pdf. The PDF is created using the live cycle designer.

    On the  PDF I have a Submit button. In the submit to URL I have the path to my asp.net server page and on the "submit as" dropdown I have "PDF" selected.

     

    When I run the application and click on the submit button nothing happens (I am not able to hit the break point on the page load of server page).

    Submit button works when I select the option of XDP or XML. I have tried to save the PDF as both static PDF and dynamic xml form but nothing seems to work.

     

    I would appreciate a lot if you could help.

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 6, 2012 7:51 PM   in reply to junaid_83

    Please ensure that your PDF is reader extended

    Regards,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2012 9:55 AM   in reply to Leena Jain123

    Hey Leena

    Thanks for the reply but how am I supposed to make the PDF reader extensible? Can I do this from live cycle designer es2 version 9.0.X.X  or do I have to use Acrobat Pro X.

    I tried the Acrobat Pro X but I was not able to find the 'Advanced' menu option. I am using trial versions for both live cycle and acrobat pro.

    Thanks,

    Junaid

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2012 10:06 PM   in reply to tarekahf

    Hi Tarek,

     

    The asp page is now on HTTPS.When I am trying to submit the form as PDF,it is being recieved as 0 bytes.The same is working with HTTP.

    Any idea?

     

    Thanks,

    Leena

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2012 4:32 AM   in reply to tarekahf

    Hi Tarek,

     

    I need your help in designing my document solution in PDF.

     

    The requirement is :

    1. Business User will define a PDF template and will store in a location.
    2. Say for example : The template has 4 fields First Name, Middle Name, Last Name, and Location.
    3. Say Location is the field which will be editable to user other all the fields will be filled by data present in database and based on some input criteria which will be driven by BUSINESS RULE.
    4. The flow would be: User will fill the required data from .NET web page UI.
      1. Once the user click submit, the required template generated in step 1 should be selectd and data retrived from D/B should get embedded.
      2. The PDF with data once gets generated should be transferred to UI as a PDF document.
      3. The end user should be able to save the pdf in local folder and edit it as well the "LOCATION FIELD".
      4. Once the end user EDIT the generated PDF should be able to save the updated PDF in local location as well.
      5. Note : The Template has got three 4 fields as mentioned above, but based on input criterai if i get three or more records that may PDF pages should get generated with LOCATION as a editable field in each page.

     

    Kindly advice how to attain this functionality.

     

    Note: We are using .NET 4.0 with N Layer architecture using WCF as a mode of communication between layers. Its going to be web based application.

     

    TIA

     

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2012 5:17 AM   in reply to tarekahf

    Hi Tarek,

     

    Thanks for your quick response. Here are my response

     

    1. It seems that point 4.3 and 4.4 you have mentioned the requirements to "Save" in a local folder in both paragraphs, right ? You mean the user can "Save" in a  local folder before and after he has edited the "LOCATION FIELD"?

     

    Ans: Yes, user should be able to SAVE the pdf file locally after editing it.

    2. Point 4.5 is not clear at all. Please rewrite this paragraph again. What do you meant by "... three 4 ..."?

     

    Ans: Let me put it in this way say as per my example i have a template of 1 page which has 4 fields and it can accomodate data of one person in it.

    Say tommorow i get similar data of more than 1 person say 3 persons( each having 4 fields of data) then in that case i should be able to create 2 copies of original template and populate data of remaining 2 persons. so finally it will be a 3 page document.

     

    2. Point 4.5 again, do you mean that you are executing a query against a back-end Database, and you may get 3 or 4 records, so each record will be redndered in a new Page inside the Dymanic PDF, right? Please clarify.

     

    Ans : Yes , you are  right

     

    Sorry i forgot to add one more requirement as per the above example all the pages should be merge to a single pdf file. So as per above example all the 3 pdf files should be rendered as a single pdf file with 3 pages.

     

    Thanks ,

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2012 3:06 AM   in reply to tarekahf

    Hi Tarek,

     

    Thanks for your response. Let me just put down my requirement once more to be more clear and get final view from you.

     

    Step 1: The Business user will generate a PDF template-T1 , which they will store in some location or sever. [Please advice do i need to use static form or dynamic form based upon the below explanantion]

     

    Say for ex : The template has three field :

    FirstName

    LastName

    Location: A drop down field which user will update once he receives the PDF

     

    Note : The Reader extension should be enabled here becuase my business requirement is the end user should be able to save the PDF locally if any modification done.

     

    Step 2 : Accept Key input params from the user using a .NET application (request object). User submits the data.

     

    Step 3: Fetch the relevant form data (data sets) from the database for the INPUT params. [Please advice do i need to use XDP /XML ]

     

    Step 4: Once data is received, the template - T1 need to be initialized and the required data fetched at step 3 need to be filled in Template T1.

     

    Thus we receive say three sets of records

    Record 1: FirstName : Adam,LastName:ABC,Location:<To be filled by end user>

    Record 2: FirstName : Joseph,LastName:XYZ,Location:<To be filled by end user>

    Record 3: FirstName : John,LastName:PQR,Location:<To be filled by end user>

     

    The Generated PDF should be having following:

    * The final PDF should have three pages. One Page for each record.

    *Reader extension should be enabled for the entire PDF so that if user chnages any location in any of the 3 pages it should get saved.

     

    Step 5:Now show the browser (response object) with Reader Enabled generated PDF of Steop 4.

     

    Step 6 : ENd user should be able to save the file in Location folder say he stored in C:\\MyPDF.

     

    Step 7 : User open the PDF and udpate the location for all three records and then should be able to save the file locally.

     

    Note : My business doesnt need to update the data back to application, let it be in PDF alone.

     

     

    Design Approach:

     

    * Should i have to use Adobe LiveCycle Designer 7.1 to design the form,?

     

    *Adobe LiveCycle Reader Extensions Server 7.2 to Reader Enable the form, If yes the is it my server side deployment component?

     

    *Adobe Reader which is Licensed free should be used by end user to view / read the PDF and modify the PDF as well as mentioned in step 7?

     

    *All the above processing until step 6 need to be happening in server side, do i need anything at my UI layer as well. Any suggestion from your end?

     

    Thanks

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2012 10:26 AM   in reply to tarekahf

    Hi Tarek,

     

    Thanks for the reply.

     

    Could you please advice on following:

    • Should i use Acrobat SDK or PDF SDK. What version should be used.
    • For reader extension , should the required DLL be installed at Server only? If yes what version should be installed.
    • How best the design and code be made very geneic?

     

    Thanks

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2012 3:39 PM   in reply to tarekahf

    Hi,

    I have a standalone PDF from which I need to call a web service to autopopulate the pdf. The PDF should work in Adobe Reader.

    The call to the webservice works in Adobe Acrobat.

    I have downloaded a trial version of ADEP to use the reader extensions but not sure how.

    I have looked at the screenshot 

    https://docs.google.com/file/d/0B97clwYte2SHYjQ0OWMzNjQtMmE3Mi00MzE5LT kzMWMtZjM5Nzc5ZTkwYTUy/edit?pli=1

    and have a few questions.

    1) Is the screenshot from livecycle? If yes then how to navigate to this screen. I have Livecycle version 8.2 on my machine.

    2) If I have to do this from reader extensions server component (LCRES) then can you send me the navigation steps. Again I have installed the adobe digital enterprise platform trial version using the jar file.

     

    Thanks,

    Junaid

     
    |
    Mark as:
1 ... 3 4 5 6 7 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)