pdf Viewer,pdf generator

pdf Viewer,pdf generator

Forum member · Jun 26, 2012
Hi, how to integrate pdf generator with pdf viewer pls provide sample code snippet thanks yashwant

Re: pdf Viewer,pdf generator

Support · Jun 26, 2012
Hello Yashwant, The DynamicPDF Generator and DynamicPDF Viewer are two separate product APIs. You can use combination of these two products depending on your business needs. The DynamicPDF Generator for .NET product allows you to generate PDF documents from scratch and DynamicPDF Viewer allows you to dynamically open the PDF document for viewing. Below is the sample code for generating PDF document using Generator for .NET product and drawing the PDF in the form of byte array and opening the generated PDF using PDF Viewer in the form load event of Windows form application. //Sample code to generate the PDF document using DynamicPDF Generator API. Document document = new Document(); Page page = new Page(); ceTe.DynamicPDF.PageElements.Label label = new ceTe.DynamicPDF.PageElements.Label("Testing", 100, 100, 200, 30); page.Elements.Add(label); document.Pages.Add(page); byte[] byteData = document.Draw(); //Code to open the genetated PDF using Viewer control. axDynamicPDFViewer1.OpenBuffer(byteData, byteData.Length, ""); Thanks, ceTe Software Support Team.

Re: pdf Viewer,pdf generator

Forum member · Jul 2, 2012
i am geting below error while integrating with dynamic pdf generator type 'System.Windows.Forms.AxHost+InvalidActiveXStateException my source code is: private void button1_Click(object sender, RoutedEventArgs e) { //Sample code to generate the PDF document using DynamicPDF Generator API. ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document(); ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page(); ceTe.DynamicPDF.PageElements.Label label = new ceTe.DynamicPDF.PageElements.Label("Testing", 100, 100, 200, 30); page.Elements.Add(label); document.Pages.Add(page); byte[] byteData = document.Draw(); AxDynamicPDFViewer.AxDynamicPDFViewer obj = new AxDynamicPDFViewer.AxDynamicPDFViewer(); //Code to open the genetated PDF using Viewer control. obj.OpenBuffer(byteData, byteData.Length, ""); }

Re: pdf Viewer,pdf generator

Support · Jul 2, 2012
Hello, You are getting the error most likely because you might be directly referencing the DynamicPDF Viewer dll files and trying to access the methods and class of the Viewer API. Please make sure that you are adding the Viewer control the Win form and this will automatically references the required dll files. You can refer the documentation on adding Viewer control to the Win Form at: http://www.dynamicpdf.com/Support/NET_Help_Library_12_04/DynamicPDFViewerGettingStartedQuickStart.html . Also refer documentation on referencing assembly at: http://www.dynamicpdf.com/Support/NET_Help_Library_12_04/DynamicPDFViewerProgrammingWithReferencingTheControl.html If you continue getting the error then please send over following details to our support team at: [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] so that they can look into it further. 1. Sample application using which we can recreate the error. 2. Steps which you are following the add the Viewer control to the Win Form. 3. Full stack trace of the error message. Thanks, ceTe Software Support Team.

Re: pdf Viewer,pdf generator

Forum member · Dec 7, 2012
hello can i use pdf viewer for rendering my output to webpage????? if not then what is the solution????

Re: pdf Viewer,pdf generator

Support · Dec 7, 2012
Hello, You can use the DrawToWeb method of the Document class of DynamicPDF Generator API to render the PDF in the browser. Please refer documentation on outputting PDF here . Yes, you can use the DynamicPDF Viewer in web application to view the PDF documents. You can contact our [^a|mailto:support@cete.com|opennewwindow|support^] team for sample code to use the Viewer in web form. Thanks, ceTe Software Support Team.