1 3 4 5 6 7 Previous Next 269 Replies Latest reply: Nov 6, 2014 10:58 PM by jyoshna09 Go to original post RSS
      • 240. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
        tarekahf Community Member

        Hi Junaid,

         

        Installing Adobe LiveCycle ES Server, for me, it was one of the most diffcult processes I have ever faced.

         

        I cannot remember exactly how I have done it last year, but check the following:

         

        1. Did you read the installation guide? Make sure to read the relevant parts of any documentation you get from the download link.

         

        2. Did you follow the trun-key installation? This means automated one.

         

        3. Depending on the option you chose for installation, you should see services services running such as: "JBoss for Adobe LiveCycle ES2" and "MySQL for Adobe LiveCycle ES2". Do you see such services, and are they started?

         

        4. To navigate to Reader Extensions Server (RES), you need to make sure the cleint (browser) has the latest version of Flash and a decent browser such as IE8, then goto this address from any client:

         

        http://<ServerName>:8080/ReaderExtensions  (user:administrator/pwd:password  by default)

         

        where 8080 is the default port, if you did not change it. If this port is already used, then you have to change it, but I don't know how.

         

        The first time, it will take a while to open... just be patient!

         

        5. To be able to use RES, you must install a Certificate using the LC Server Admin UI. This is also another story. I forgot how to do that actually. Part of the install process, there is option to download and install a certificate which will be valid for 2 weeks I think. This means, after you Reader-Enable the PDF, it will be valid for 2 weeks (as per what I remember).

         

        The latest version is Adobe LiveCycle ES3 Server (I think), and make sure you are not confusing this with the LiveCycle ES Desinger, which is a client product.

         

        Tarek.

        • 241. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
          robin_p Community Member

          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
          • 242. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
            tarekahf Community Member

            Ho Robin,

             

            1. Use Acrobat SDK only if you are developing Windwos Desktop Application (VB.NET for example). I never worked with PDF SDK.

             

            2. According to your requirements, you do not need Adobe LiveCycle Reader Extentions Server. You only need to get one license of Acrobat Prof. Then, use Acrobat to Reade-Enable to PDF Form after you have finished working with LiveCycle Desinger. So, every time you change the Form Desing, you need to reader-enable the PDF before you deploy it for production.

             

            There is no need to install any DLL for this purpose.

             

            3. For me, to ensure I have generic and reusable desing and implementation, I am following CSLA .NET framework for the past 4 years. Make sure to check the guide I published on my Google Workspace, and if you have any question, please let me know. The guide is not complete but I am willing to prepare a decent guide, so with you help, we can do it. All you have to do is to get started. I will update the guide everytime you get stuck.

             

            Do you want me to upload the latest version of the code (programs) I have and the latest form desing I have completed?

             

            Tarek.

            • 243. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
              robin_p Community Member

              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

              • 244. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                tarekahf Community Member

                Hi Robin,

                 

                If you are using ASP.NET, so no need to use SDKs and no need to use the other SDKs you have mentioned.

                 

                Make sure to read the guide I have published on Google Docs. It has good info for you to get started.

                 

                You only need to use:

                 

                1. Windows Server, IIS, ASP.NET and .NET XML APIs.

                 

                2. Acorbat Prof. to reader enable the PDF. Once it is reader enabled, then any client can use the PDF to fill and save it off-line. But, you cannot submit outside the browser for example.

                 

                After you generate the XML and render the XDP back to the client, if the client has Adobe Reader installed properly with proper integration with the Browser, it will render propery, even of the PDF is not reader enabled. The feature "Reader-Enable" has nothing to do on the server side. It is a client feature.

                 

                3. Adobe LiveCycle Desing to desing the forms.

                 

                4. Browser like IE8 for the client to click a link to navigate to ASPX page to generate the XML using input parameters, and render XDP (PDF Form) back to the client.

                 

                5. The user must have Adobe Reader installed (version must be same or higher than the one you specified when using LC Desinger). Note that Adobe Reader can be installed, and still it will not work. In this case, remove and re-install or repair.

                 

                6. Note that Google Chrome does not support Dynamic PDF, so XDP will not render under Chrome. Firefox latest version and IE 8 and IE 9 work fine.

                 

                Tarek.

                • 245. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                  Jun_1234 Community Member

                  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

                  • 246. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                    tarekahf Community Member

                    Hi Junaid,

                     

                    You are installing Workbench, which is not Adobe LiveCycle Server. Workbench is like Visual Studio for .NET.

                     

                    Try this link, it has full documentation, and this is the one I used when I installed it last year:

                     

                    http://help.adobe.com/en_US/livecycle/9.0/documentation.html#task=1,3&module=-1

                     

                    Keep in mind that this is like installing MS SharePoint Server. You have to do a lot of steps.

                     

                    For reader extensions, you also have to download a trial certificate which also you have to install using LC Admin UI or something like that, and then you will be able to reader-enable the PDF Files.

                     

                    May I ask you to take screen shots while you are installing. This way, you will make it easier for other.

                     

                    I feel sorry I did not take screen shots with every step.

                     

                    Next time, I will surely take screen shots, or I will record a video using Screenr.com.

                     

                    Tarek.

                    • 247. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                      robin_p Community Member

                      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

                      • 248. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                        tarekahf Community Member

                        Hi Robin,

                         

                        I think that is easy to do, if you follow my recommendation for implemeting your requirements from the beginning.

                         

                        Here is the process/flow you have to follow:

                         

                        1. User U1 clicks a link, and T1 is generated, and probably prepopulated if required, and rendered back to user.

                         

                        2. User U1, after T1 is rendered, he will fill the PDF Form and click Submit.

                         

                        3. The Submit process (ASP.NET Program) by U1 for T1 will extract the PDF Binary (T1-key.PDF) and Data (T1-key.XML) and store them on separate files on a folder on the server. Make sure to generate the files names so that they have the primary key or a unique key. Also, during the submit process, it is better to insert a control record in a SQL Server Table, which has the primary key, and the file name (PDF and Data) and location. I can give you a sample of a Table I am using if you like.

                         

                        4. Now, some time later, User U2 will click a link to generate T2 and probably prepopulate if required, and it will be rendered back to user.

                         

                        5. Same like 2 above, but for T2.

                         

                        6. Same like 3 above, but for T2.

                         

                        7. By now, you have 4 files:

                         

                          * T1-key.PDF

                          * T1-key.XML

                          * T2-key.PDF

                          * T2-key.XML

                         

                        8. Now, you need to design T3 LiveCycle PDF Form which is a a combination of T1 and T2. WARNING: Make sure to desing it so that the design elements (subforms and fields) in T3 are structured in such a way to match those structures in T1 and T2. This way, you will spend much less effort during Data Binding when you want to generate T3. For example, inside T3, create a subform that represents T1 and another one for T2, and then all you have to do, is to bind the root element of the subform, and all the biding of the child elements will be very easy.

                         

                        But, if T3 structure is a mix of T1 and T2 without any order, then you have to spend a lot of effort in Data Binding in LiveCycle Desinger, or in the way to generate the XML Data when you are rendering T3.

                         

                        9. Now, it is time to generate T3.

                         

                        10. User U3 will click a link to generate T3, and the ASP.NET Program must use a primary key as input to locate the XML Data Files of T1 (T1-key.XML) and T2 (T2-key.XML), load them using .NET XML APIs, and extract the data root or relevant nodes, combine and/or merge as needed ---> the end result must be compatible with the desing of T3. Finally, the program must render T3 by merging its template with the newly generated XML Data.

                         

                        11. If you want to save T3, of course, you need to implement a "Submit" process for this case.

                         

                        I hope this helps.

                         

                        Tarek.

                        • 249. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                          robin_p Community Member

                          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

                          • 250. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                            tarekahf Community Member

                            Hi Robin,

                             

                            Following is my feedback:


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

                             

                            If you want to generate the PDF using a XDP (XFA and XML Merged together) and save the result PDF as .PDF File on the server, then the only way I know is to use Adobe LiveCycle ES2 Services which is either in Foundation module or Output Module. You can consume such services as Web Services from ASP.NET.

                             

                            If you want to do the same using ASP.NET, then you MUST follow the steps below:

                             

                            a. User Clicks a Link to ASPX Page,

                            b. ASP.NET Program will use an existing PDF Template (T1) and merge it with XML and must render the result to the browser as MIME as follows:

                             

                                 Response.ContentType = "application/vnd.adobe.xdp+xml"

                             

                            c. When the PDF is rendered under the browser completely, there must be a "Save" button on the form to Submit the it to the server (to another ASPX) page, then in the .NET Program you must extract the PDF from the Request Input Stream, and save it to the server as .PDF File.

                             

                             

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

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

                             

                            Note: T1 is the Empty PDF LiveCycle Form, and T1 + XML Data = XDP, when rendered inside the Browser, it will show as PDF then it can be saved as PDF.

                             

                            The above is possible only using Adobe LiveCycle Services, becuase you want the PDF to be generated and saved on the Server directly without involving the client.

                             

                            You need to think very carefully about what is the objective? Do you want to have a Physical .PDF File after Generating the Data for T1? If you do not want to end up with a Physical PDF after Generating P1, then you only need to generate the XML Data and save it as a text .XML File. Anytime you want to render it to the client, you can Merge T1 with its XML Data, and render it to the client as XDP.


                            3.The Next step at server should be :

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

                             

                            If you mean combining 2 binary PDF Files, then the only way is to use LiveCycle ES2 Services or some 3rd party tools.

                             

                            So, if P3 = P1 + P2, without any changes in the layout of P1 nor in P2, then you need PDF output or some other tools.


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

                             

                            The only way to do this is to use LC Services or some 3rd party tools.

                             

                            Tarek.

                            • 251. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                              $Aravind.K$

                              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.

                               

                               

                              • 252. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                tarekahf Community Member

                                Hi Aravind,

                                 

                                What is the error you are getting? Out of Memory Exception?

                                 

                                Please post the complete error and stack trace.

                                 

                                Also, check this thread, I also faced this error, and found a resolution to some extent:

                                 

                                http://forums.asp.net/t/1662571.aspx/1?URGENT+Exception+OutOfMemoryException+thrown+when+w hen+converting+to+String

                                 

                                Let me know if this is similar to your problem, I will updated the source code on my Google Workspace to the latest version, OK?

                                 

                                Tarek.

                                • 253. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                  anand.padmanabhan Community Member

                                  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.

                                  • 255. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                    tarekahf Community Member

                                    Hi Anand,

                                     

                                    Yes, I think it is possible, with some extra programming effort.

                                     

                                    I never done this before, and I like to do it one day.

                                     

                                    You need to use the HostContainer Object to pass messages between the browser and the PDF.

                                     

                                    Check this online demo:

                                     

                                    http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm

                                     

                                    Let me know if it works.

                                     

                                    Tarek.

                                    • 256. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                      BorisTs. Community Member

                                      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

                                      • 257. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                        tarekahf Community Member

                                        Hi Boris,

                                         

                                        I will answer your questions accordingly:

                                         

                                        1. Open Adobe LiveCycle Desinger and take menu option File/New, select "Based on a Template" and follow the Wizard. You will find large number of ready templates that will be a great start for you.

                                         

                                        2. Check this public folder on Google Docs: http://adobe.ly/GX7LR3 . It has a guide and bunch of file to help you get started. Let me know of you have any trouble understanding its content. Look for this document "Developer Guide: How to use ASP.NET to work with LiveCycle PDF Forms and Data"

                                         

                                        3. You can save the entire PDF as Binary in a SQL Server Field varbinary(max) not varchar(max). But, I recommend you not to do so. You should store the PDF as a File on a File System it is much better. My sample code shows you how to save the submitted PDF as XML Text File and also as PDF Binary File. Trust me on this, and do not store the PDF inside a SQL Server field.

                                         

                                        Also, you can store XML Elements Data (Form Field Values) to designated SQL Server Fields. My sample code shows you exactly how to do that.

                                         

                                        4. My sample code also shows you how to retreive the PDF Binary from File System and also, as per certain conditions, retrieve data from SQL, merge it with PDF (empty template), and finaly send the result to the client.

                                         

                                        With regards to using Acrobat SDK, it is simply another option. But certainly this is for Desktop Applications not for Web Applications (I think). You will also find another sample in the above link for an entire working project for this purpose, and it think it will blow you mind away

                                         

                                        Let me know if you need further help.

                                         

                                        Tarek.

                                        • 258. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                          BorisTs. Community Member

                                          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

                                          • 260. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                            BorisTs. Community Member

                                            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

                                            • 261. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                              tarekahf Community Member

                                              Thanks Boris,

                                               

                                              So far, only in VB.NET. If you can convert some of the example to C# that would be excellent.

                                               

                                              Tarek.

                                              • 262. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                anand.padmanabhan Community Member

                                                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

                                                • 263. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                  tarekahf Community Member

                                                  Hi Anand,

                                                   

                                                  This is great ! I was also dreaming to implement this using HostContainer. Did you follow the code from this example:

                                                   

                                                  http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm

                                                   

                                                  I would be great if you could post samples of your work, especially the JavaScript code in the Browser and in the PDF.

                                                   

                                                  Tarek.

                                                  • 264. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                    anand.padmanabhan Community Member

                                                    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.

                                                    • 265. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                      tarekahf Community Member

                                                      Thank you Anand,

                                                       

                                                      This is wonderful !

                                                       

                                                      Do you mind if I add you code sample to my documentation on Google Docs which is public? Of course, I will refernce you name.

                                                       

                                                      Tarek.

                                                      • 267. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                        shanewaj Community Member

                                                        Hi Tarek,

                                                        I am very new to this Livecycle world, I never thought about this before yesterday .

                                                        Now I need to create this application ...

                                                        I have to connect to a livecycle website from a c# desktop application

                                                        and load a form and display the form and submit the form once done.

                                                        Now problems are

                                                             1. All this needed to be done offline mode ... user will connect to the server for form

                                                                 and then will disconnect user will submit the form .. internet connection will have no guarantee so the application have to handle that part like uploading the data when connectivity is found.

                                                            2. User should not be able to realize that this is a PDF form ...

                                                            3. I do not have any browser unless I embed one in the application

                                                            4. .NET framework 2.0

                                                            5. No third party API can be used.

                                                         

                                                        I saw a phonegap application comes with ES4 .. most probably I need create something like that...

                                                         

                                                        Do you think this is possible ... or I am just wasting my time.

                                                         

                                                        Any advice will be appreciated

                                                         

                                                        Thanks

                                                        Shanewaj

                                                        • 268. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                          tarekahf Community Member

                                                          Sorry Shanewaj, just found out about your query.

                                                           

                                                          I hope you made some progress, however, here is my feedback.

                                                           

                                                          I am sure what you are asking for can be done, but since you are asking for a solution, it will be difficult to give any specific answer. There are many approaches to meet your objectives, and you have to start with Adobe Acrobat SDK and use IAC feature (OLE Automation). Download the SDK and you will find a lot of samples. Several years ago, I collected some documents and I have some sample codes which might be of help to you:

                                                           

                                                          Click here to access the code samples

                                                           

                                                          My recommendation is to start by developing a simple working prototype of a very small feature.

                                                           

                                                          Tarek.

                                                          • 269. Re: Using Adobe LiveCycle Designer with ASP.NET to populate PDF Forms from Server Database.
                                                            jyoshna09 Community Member

                                                            Hello All,

                                                             

                                                            I have created a dynamic form using Adobe Livecycle Designer ES2. The form contains a hidden textfield "submit_url" which holds the url value and there's a field of type "button" and control type "regular".

                                                             

                                                            On click of the button ,I have added the following script:

                                                            event.target.submitForm({

                                                            cURL:

                                                            submit_url.rawValue,

                                                            cSubmitAs:

                                                            "PDF",

                                                            cCharset:

                                                            "utf-8"

                                                            });

                                                             

                                                            The default value for submit_url is set as "pdf". When i open the form using Adobe Acrobat Pro 9, it prompts to "Save a blank copy of form". On click of cancel in the alert box ask to save the form in the local desktop folder named "pdf" {which is the default value for the same).

                                                             

                                                            When i render the form using browser { where the browser pdf action (under browser settings) is set to "Use Adobe Acrobat(in Firefox)". }, onclick of the submit button prompts to "Save a blank copy of form".On click of cancel in the alert box ,doesnot submit the form to the respective URL.

                                                             

                                                            Please provide some ways to do so.

                                                             

                                                            Thanks.

                                                            1 3 4 5 6 7 Previous Next