Pdfconverter in asp.net




















Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.

The code above will produce a PDF document based on the default settings of the library which is enough for the most of the situations. However, the converter library offers a large number of parameters that you can set to customize the conversion process. You can add headers and footers with text and images to the resulted PDF document, specify page orientation, page size, compression level of the resulted PDF document, encrypt the resulted document and set user and owner password, set the permissions for printing 2.

You have to unzip the archive in a folder on the disk. Below is a brief description of the content of the archive. WebSample - is a ASP. The application uses the HTML to PDF Converter library and shows you how to set various conversion parameters like the headers and footers, page size, page orientation, compression level, etc. This application runs live on our website homepage.

NET are listed below. Basically this is the environment we used for testing the product. NET Framework 2. NET applications 4. In order to use the converter library you have include the ExpertPdf. HtmlToPdf namespace in your application. Below is a brief description of the main classes and properties of the converter. The conversion result can be a stream of bytes as byte[] object or a file on the disk. The URL must be anonymously accessible from the computer running your application otherwise a 'Get web page content cancelled or invalid URL supplied' exception is thrown by the converter.

The best way to debug this type of exception is to load the URL in the Internet Explorer browser running on the same machine with your application and see if the page is correctly loaded. If you don't set this parameter the images referenced by relative URLS won't appear in the document and the styles from external CSS files won't be applied to the rendered document. The correspondent methods you can use to render the PDF document in disk file are listed below.

These methods internally use the methods above to get the bytes array and then they simply save the bytes in the specified file on disk.

You can set the PDF document page size A4, A3, etc , orientation Portrait or Landscape , compression level, encryption and passwords, document info author, title, subject, etc , add headers and footers with page numbering, etc. The main properties of the converter are listed below. To set the license key you received after purchase and unlock the product you can use the LicenseKey property. If this property is not set with any value the converter will enter in demo mode.

The PageWidth and PageHeight properties allow you to set the width and height of the virtual browser windows. The web page content is rendered based on the virtual browser width specified as an integer value in pixels. Setting these properties has the same effect as the effect produced when resizing a web page in a browser window to the specified dimensions. The default value of the PageWidth property is pixels. The default value of the PageHeight property is 0 pixels which mean the height will be automatically determined.

These values are producing good results in most of the cases but there are also some situations when you'll have to change these properties. You can also choose to let the converter auto determine both the width and height of the virtual browser by setting both PageWidth and Page Height properties to 0.

This property exposes an object of PdfDocumentOptions type which is automatically created in the PdfConverter constructor. Right click on Index method and select Go To View where you will be directed to its associated view page Index. By executing the program, you will get the PDF document as follows. Windows NuGet package as reference to your. Then, set Copy to output directory to copy all the BlinkBinariesWindows All files including inner folders and files assemblies.

Take a look at our next generation Bold Reporting Tools. Learn more. Now you can easily use your charting and graphics web components to create charts and graphics in PDF. Word to PDF Converter. Excel to PDF Converter. PDF to Text Converter. PDF to Image Converter. PDF Images Extractor. PDF Print. PDF Merge. PDF Split. PDF Security.

Order Online. License Renewal. License Agreement. Our Customers. User Guide.



0コメント

  • 1000 / 1000