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
    Mar 28, 2012 12:03 AM   in reply to tarekahf

    Hi Tarek,

     

    Need suggestion on the question i asked u in my previous post.

     

    Could you please advice based on my requirement, since i am generating PDF , XML and my PDF templates all residing at my App Server Layer, what kind of Adobe product is required at server side.

     

    Kindly note that i need the reader extension feature at Client Side.

     

    Any advice on using:

    • Acrobat SDK  or
    • PDF Library SDK or
    • Acrobat PDF Library. or
    • Or any third party software like : ASPOSE, ACTIVEPDF etc
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 12:14 AM   in reply to tarekahf

    Thx for a quick response Tarek.

     

    Mine is a ASP.NET application and the server side generated PDF should be rendered to IE to client.

     

    Thus if i can outline the entire process it would be :

    1. Generate the Template using  LiveCycle Desinger.
    2. Once Template is designed use Acrobat to Reade-Enable to PDF Form, and store it in any location.
    3. A server side .NET componet should be written that will Generate the XDP (XML) and populate the Template.

           

          If i understand right in this place i need to use either PDF library SDK or Acrobat SDK or any third party software to get a complete PDF at server side.

     

    4 . Once i get the PDF, render the PDF to IE to end user.

    5. SInce the template is already Reade-Enable, the reader extension feature will be available to the PDF being rendered at IE to user.

    6.The end user as per my requirement can save, edit the PDF file as the PDF is reade-enabled?

     

    Correct me or advice me if i missed anything.

     

    Request you to kindly upload the latest doc and code which you had mentioned, it would be really helpful.

     

    TIA

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 4:08 PM   in reply to tarekahf

    Hi,

    I have tried to install whatever I could from this URL http://www.adobe.com/devnet/livecycle/trial.html

    After downloading I got a folder named LiveCycleWorkbench_9500_WWE_Win, LiveCycleServer_9001_JBoss_WWEFDJ_Win, LCRE_ES_Certificate_Trial,

    LC_9.0.0.2_QF_2.38.

    Initially I clicked on the run_windows_installer.bat in the LiveCycleWorkbench_9500_WWE_Win folder which installed the livecycle workbench successfully, after this I am not able to install the run_windows_installer.bat in the  LiveCycleServer_9001_JBoss_WWEFDJ_Win folder. When the .bat file is clicked nothing happens.

    I am trying to enable PDF for reader extensions(server) to call a web service from adobe reader.

    Can someone write the step to installing the reader extensions server component. What are the prerequistics etc.

    Tarek after starting the workbench I have checked the services services.msc but didnt find any for jBoss or mySQL.

     

    Thanks,

    Junaid

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2012 7:35 PM   in reply to tarekahf

    Hi Tarek,

     

    I have a new requirement where in it is:

    • We have Two PDF template T1 and T2 both are reader extension enabled ADOBE LS Dynamic forms.
    • As per business need, customer wants the final PDF should have data comprising of Template T1 and T2 and also reader extension enabled.

     

    Please advice is this possible if yes what approach should i take?

     

    Thanks

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2012 3:15 AM   in reply to tarekahf

    Thanks for the reply, Its really very exhaustive.

    There is a slight change :

    1. All the PDF processing should happen at Server Side.

    2. User U1 do some business process, based upon that

    • T1 is generated, data Pre-Populated hence PDF P1 or XDP is generated at Server
    • T2 is Generated, Data Pre-Populated hence PDF P2 or XDP  is generated at Server

    3.The Next step at server should be :

    • Merge PDF P1 and P2 At Server and Hence create a final PDF = P3

    4. Render P3 to the end user for View/Save with Reader extenion enabled.

     

    Is it possible to attain ?

    If yes can be done through .NET libraries or i need to use LiveCycle ES Services?

     

    TIA

    Robin

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2012 8:14 PM   in reply to tarekahf

    Hello Tarek,

     

    Hope you are doing well.

     

    I have an issue to share with related to this thread...

     

    I manage to submit pdf form to asp.net page and read whole chunk to binaray data, but some times i got exception when write this binary data to pdf file.

     

    this issue occured to me once a while only let say less than 1%, but in production that causing me more problem. can you please give an idea.

     

    chunk = xmldoc.GetElementsByTagName("chunk")(0).InnerXml

    Dim buffer() As Byte = Convert.FromBase64String(chunk)

    Dim fs AsSystem.IO.FileStream = New System.IO.FileStream(Server.MapPath("XYZ.pdf"), IO.FileMode.Create, FileAccess.ReadWrite)
    Dim bw As System.IO.BinaryWriter = New System.IO.BinaryWriter(fs)
    bw.Write(buffer)
    bw.Close()
    bw = Nothing
    fs.Close()
    fs = Nothing

     

    Thank you.

     

     

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 27, 2012 7:58 AM   in reply to tarekahf

    HI Tarek,

     

    I have implemented the feature to display a fillable PDF in the browser within an iFrame, allow the user to fill the form fields and then save the changes by using a Save button in the PDF document.

     

    Clicking Save button within the PDF document will trigger HTTPSUBMIT and submits the entire PDF document to the application server from where I'm pushing the PDF to the database.

     

    Now, instead of having the save button within the PDF document, I would like to have it outside the PDF (i.e. directly in the web page). Can this be achieved? I tried different things but couldn't find solution.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 27, 2012 8:01 AM   in reply to anand.padmanabhan
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2012 6:15 PM   in reply to tarekahf

    Hello Tarek,

    I'm new to Adobe Acrobat/LiveCycle and wanted to ask for your adice on how to establish the following process:

    1. Create a PDF form template using Adobe LiveCycle ES.

    2. Using ASP.NET application bind this template with fields from MS SQL Server

    3. Save PDF result in database as a binary object (VARCHAR(MAX))

    4. Send PDF to a client's browser

     

    I was trying to use Acrobat SDK for static forms (FillFormCS) using XML data biding but I'm wondering if there's a better solution available to render PDF in .NET object, save it as a stream and send it back to the client. FillFormCS requires to save a PDF template with a new name on local disk first before binding form data.

     

    Thank you in advance!

    Boris

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 8:28 AM   in reply to tarekahf

    Thank you, Tarek, for your quick response!

    The following link http://adobe.ly/GX7LR3 points to the current adobe forum discussion rather than public folder on Google Docs.

    Please advise.

     

    Thanks,

    Boris

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 12:53 PM   in reply to tarekahf

    WOW... This folder has a lot of examples. Thank you VERY much, Tarek!

    I've noticed that many examples are written in VB.NET. By any chance, do you have some examples using C#?

     

    Thank you again!

    Boris

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 21, 2013 10:29 AM   in reply to tarekahf

    I was finally able to achieve this after weeks of research and programming...I used HostContainer object to pass message between the browser (ASP.NET web form) and the PDF. Have created a document level javascript in the PDF to accept the message and handle it to either submit the form to the server, show print dialog or show saveas dialog box.

     

    I have removed the Save, Print, and Download buttons from my form and added them to the main web form.

     

    Regards,

    Anand

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2013 12:22 PM   in reply to tarekahf

    Yes, I referred the code sample in that link.

     

    Below is the document level javascript to be added to the PDF to handle Save, Print and Download messages from the browser,

     

    this.disclosed = true;

    if(this.external && this.hostContainer)

    {

      function onMessageFunc( stringArray )

      {

        var myUrl = stringArray;

    try{

    if (myUrl == "print")

    {

    // get the printParams object of the default printer

    var pp = this.myDoc.getPrintParams();

    // set some properties

    pp.interactive = pp.constants.interactionLevel.full;

    // print

    this.myDoc.print(pp);

    }

    else if (myUrl == "download")

    {

    app.execMenuItem("SaveAs", this.myDoc);

    }

    else

    {

    this.myDoc.submitForm({

    cURL: myUrl,

    cSubmitAs: "PDF"});

    }

    }

    catch(e){app.alert(e.message);}

      }

     

     

      function onErrorFunc( e )

      {

    app.alert(e.toString());

      }

     

      try

      {

         if(!this.hostContainer.messageHandler)

           this.hostContainer.messageHandler = new Object();

     

         this.hostContainer.messageHandler.myDoc = this;

         this.hostContainer.messageHandler.onMessage = onMessageFunc;

         this.hostContainer.messageHandler.onError = onErrorFunc;

         this.hostContainer.messageHandler.onDisclose = function(){return true;};

    //HostContainerDisclosurePolicy.SameOriginPolicy;

    //app.alert("Browser Message Handlers setup");

       

      }catch(e){app.alert(e.toString());};

     

    }

     

    Below is the javascript in my ASPX page to pass message to the PDF once the button in the web page is clicked,

     

    <script type="text/javascript">

            function Button2_onclick() {

                var PDFObject = document.getElementById("PdfObject");

                if (PDFObject != null) {

                    //alert("PDF object found!!");

                    PDFObject.postMessage(["http://localhost/PdfProcessor.aspx?SubmittedFormPart=1"]);

                }

            }

     

     

            function Print_onclick() {

                var PDFObject = document.getElementById("PdfObject");

                if (PDFObject != null) {

                    //alert("PDF object found!!");

                    PDFObject.postMessage(["print"]);

                }

            }

     

     

            function Download_onclick() {

                var PDFObject = document.getElementById("PdfObject");

                if (PDFObject != null) {

                    //alert("PDF object found!!");

                    PDFObject.postMessage(["download"]);

                }

            }

        </script>

     

     

    Below is the ASPX code to bind the PDF via HTTP handler to the <Object>

     

    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"

        CodeBehind="Default.aspx.cs" Inherits="SaveOutsidePdf._Default" %>

        <script runat="server">

        private string _PdfPath;

     

     

        protected void Page_Load(object sender, EventArgs e)

        {

            _PdfPath = "StaticPdfHandler.ashx#toolbar=0&navpanes=0";

        }

    </script>

     

     

    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

    </asp:Content>

    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

        <input id="SaveFilledPdf" type="button" value="Save PDF"

            name="SaveFilledPdf" language="javascript" onclick="return Button2_onclick()">

          <input id="PrintButton" type="button" value="Print PDF"

            name="PrintPdf" language="javascript" onclick="return Print_onclick()">

              <input id="DownloadFilledPdf" type="button" value="Download PDF"

            name="DownloadFilledPdf" language="javascript" onclick="return Download_onclick()">

        <object id="PdfObject" data='<%=_PdfPath %>' width="100%" height="600px"

        type="application/pdf"></object>

    </asp:Content>

     

     

    Let me know if you have any questions.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2013 12:40 PM   in reply to tarekahf

    No problem. Please go-ahead.

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

More Like This

  • Retrieving data ...

Bookmarked By (0)