Developer Tools
|
Office Productivity Applications
|
Platform-Agnostic APIs
|
Home | Online Demos | Downloads | Buy Now | Support | About Us | News | Working Together | Contact Us
There is already an article explaining how to export from THTMLViewer using eDocEngine. However, it tried to solve a bit more complicated problem (for a customer who wanted to export from XML to PDF) and is hence a bit convoluted. It applies an XSL stylesheet to XML data, generates a HTML page and then exports it to PDF.
Here is a more straight-forward version. The THTMLViewer component is from http://www.songbeamer.com/delphi/, who provided an updated version of David Baldwin's HTML Display Components (ThtmlViewer, TFrameViewer, and TFrameBrowser). A copy of it is also shipped with eDocEngine.
In this video, the THTMLViewer package is installed from source and then used in a VCL Forms application project to export a HTML page to PDF.
Here is the code. It convert a HTML document found in the RAD Studio folder. Please note that THTMLViewer can display only simple documents.
procedure TForm1.Button1Click(Sender: TObject); begin // gtHtmlViewInterface1.Engine := gtPDFEngine1; // or any other engine gtPDFEngine1.FileName := 'html_export.pdf'; gtHtmlViewInterface1.RenderDocument(HTMLViewer1); end; procedure TForm1.FormCreate(Sender: TObject); begin HTMLViewer1.LoadFromFile('C:\Program Files\Embarcadero\RAD Studio\12.0\deploy_en.htm'); end;
---o0O0o---
Our .NET Developer Tools | |
---|---|
![]() Gnostice Document Studio .NETMulti-format document-processing component suite for .NET developers. |
![]() PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
Our Delphi/C++Builder developer tools | |
---|---|
![]() Gnostice Document Studio DelphiMulti-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms. |
![]() eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
![]() PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
Our Java developer tools | |
---|---|
![]() Gnostice Document Studio JavaMulti-format document-processing component suite for Java developers. |
![]() PDFOne (for Java)A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications. |
Our Platform-Agnostic Cloud and On-Premises APIs | |
---|---|
![]() StarDocsCloud-hosted and On-Premises REST-based document-processing and document-viewing APIs |
Privacy | Legal | Feedback | Newsletter | Blog | Resellers | © 2002-2025 Gnostice Information Technologies Private Limited. All rights reserved. |