Generate, view, and print PDF files in your .NET applications in one place with ComponentOne PDF Tools.
ComponentOne PDF is a .NET library that supports advanced features that are part of PDF specification, which can help you create a PDF file in your application.
After creating a PDF file, you can load that file using ComponentOne PDFDocumentSource, a library that can load and view your PDF in FlexViewer in your .NET application. PDFDocumentSource can also independently search keywords in your PDF, as well as export and print your PDF files. In addition to PDFs generated from C1PDF, FlexViewer can also load any PDF.
FlexViewer is a flexible viewer that can load reports and documents like C1FlexReport, SSRS Reports, and PDF files. It also offers powerful features for viewing documents. Please see more information about FlexViewer here.link to flexviewer page
Because all of the above tools are cross-platform, you can generate, view, and print PDF files in any of the Winforms, WPF, and UWP applications.
Suppose you want to put various images of your office locations in a single file and store it in a PDF. You also want to load this PDF at run time and print it. You can do this in a WinForms application using the following steps (as well as a WPF or UWP application):
- Step 1: Add the following references to refer to C1PdfDocumentSource and C1Pdf in your application:
- C1.Win.C1Document.4
- C1.C1Pdf.4
- Step 2: Drop C1FlexViewer on the form.
- Step 3: In Form_Load method, copy the following code to generate a PDF file using the C1PdfDocument class. In this example, various office location images are drawn in a rectangle using the DrawImage method on every new page. When you use the DrawString method, the office name is defined at a particular location. In the end, the PDF is saved in a file.
- Step 4: Now that you've created and generated a PDF file, you are just a few steps away from viewing it in a Viewer at run time. Create a C1PDFDocumentSource object and load the file in it.
- Step 5: Load the C1PDFDocumentSource in FlexViewer.
This is what your PDF file should look like: * Step 6: To print the file, simply click the Print button on FlexViewer.
Please note that your application references the following DLLs when running the above example:
- C1.Win.C1Document.4
- C1.C1Pdf.4
- C1.Win.4
- C1.Win.Barcode.4
- C1.Win.Chart.FlexChart.4
- C1.Win.ImportServices.4
- C1.Win.Bitmap.4
- C1.Win.C1DX.4
- C1.C1Excel.4
- C1.C1Pdf.4
- C1.C1Word.4
- C1.C1Zip.4
- C1.Win. FlexViewer.4
- C1.Win.C1Ribbon.4
Learn more about C1PDF here. Learn more about the C1PDFDocumentSource component here.should link to corresponding pages.