Browsed by
Month: January 2019

HotPDF Table To PDF

HotPDF Table To PDF

HotPDF Component Database Table To PDF sample program TableDemo; {$APPTYPE CONSOLE} { Reduce EXE size by disabling as much of RTTI as possible } {$IFDEF VER210} {$WEAKLINKRTTI ON} {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} {$ENDIF} uses {$IFDEF VER230}System.Classes, System.SysUtils, Vcl.Graphics, DB, DBTables, {$ELSE} Classes, SysUtils, Graphics, DB, DBTables, {$ENDIF} HPDFDoc; var HotPDF: THotPDF; PageNum, VertPos: Integer; CustomerTable: TTable; Back: boolean; procedure PrintRow(Position: Integer; No, Company, Addr, City: AnsiString; ShowBackground: boolean); begin if ShowBackground then begin HotPDF.CurrentPage.SetRGBColor($FFF3DD); HotPDF.CurrentPage.Rectangle(50, Position, 520, 20); HotPDF.CurrentPage.Fill;…

Read More Read More

HotPDF Chart Sample

HotPDF Chart Sample

This HotPDF Component example show charts in PDF document using TeeChart. unit ChartUnit; interface uses {$IF CompilerVersion >= 16} Winapi.Windows, Winapi.Messages, System.SysUtils, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, VclTee.TeeGDIPlus, VclTee.TeEngine, VclTee.Series, VclTee.TeeProcs, VclTee.Chart, {$ELSE}Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, TeEngine, Series, TeeProcs, Chart, {$ENDIF} HPDFDoc; type TForm1 = class(TForm) RadioGroup1: TRadioGroup; DemoChart: TChart; BarSeries1: TBarSeries; BarSeries2: TBarSeries; BarSeries3: TBarSeries; Panel1: TPanel; Label1: TLabel; RadioGroup2: TRadioGroup; ComboBox1: TComboBox; Button1: TButton; procedure RadioGroup1Click(Sender: TObject); procedure FormCreate(Sender: TObject);…

Read More Read More

HotPDF Barcode Sample

HotPDF Barcode Sample

This HotPDF Component example generates barcode within PDF for 22 popular types. program Barcodes; {$APPTYPE CONSOLE} uses {$IFDEF VER230} System.Classes, System.SysUtils, Vcl.Graphics, {$ELSE} Classes, SysUtils, Graphics, {$ENDIF} HPDFDoc; var I, H: Integer; HotPDF: THotPDF; const Names: array[0..21] of string = ( ‘Code 25 Interleaved’, ‘Code 25 Industrial’, ‘Code 25 Matrix’, ‘Code39’, ‘Code39 Extended’, ‘Code128A’, ‘Code128B’, ‘Code128C’, ‘Code93’, ‘Code93 Extended’, ‘MSI’, ‘PostNet’, ‘Codebar’, ‘EAN8’, ‘EAN13’, ‘UPC_A’, ‘UPC_E0’, ‘UPC_E1’, ‘UPC Supp2’, ‘UPC Supp5’, ‘EAN128A’, ‘EAN128B’ ); begin HotPDF:= THotPDF.Create(nil); try HotPDF.AutoLaunch :=…

Read More Read More

HotPDF Hyperlink Sample

HotPDF Hyperlink Sample

This HotPDF Component Sample adds clickable hyperlinks into PDF document. unit Main; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, StdCtrls, Forms, Dialogs, HPDFDoc; type TForm1 = class(TForm) HotPDF: THotPDF; HelloWorldButton: TButton; edtWeb: TEdit; edtProduct: TEdit; edtOrder: TEdit; edtContact: TEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; procedure HelloWorldButtonClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.HelloWorldButtonClick(Sender: TObject); begin HotPDF.BeginDoc; HotPDF.CurrentPage.SetFont( ‘Microsoft Sans Serif’, [], 13 );…

Read More Read More

HotPDF Text Annotation

HotPDF Text Annotation

This HotPDF Component sample adds a text annotation at the specified location of the PDF document. program Annotation; {$APPTYPE CONSOLE} uses {$IFDEF VER230} System.Classes, System.SysUtils, Vcl.Graphics, {$ELSE} Classes, SysUtils, Graphics, {$ENDIF} HPDFDoc; var HotPDF: THotPDF; begin HotPDF := THotPDF.Create(nil); try HotPDF.FileName := ‘Annotation.pdf’; HotPDF.BeginDoc; HotPDF.CurrentPage.TextOut(120,65,0,’Click the icon:’); HotPDF.CurrentPage.AddTextAnnotation( ‘This is a text annotation.’ + #13#10 + ‘Dies ist eine Textanmerkung.’ + #13#10 + ‘Ceci est une annotation textuelle.’ + #13#10, Rect(120, 80, 140, 100), true, taComment, clBlue ); HotPDF.EndDoc; finally…

Read More Read More

HotPDF Vertical Text Sample

HotPDF Vertical Text Sample

This example demonstrates how the HotPDF component generates Unicode┬ávertical text. unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, HPDFDoc; type TForm1 = class(TForm) Button1: TButton; HotPDF: THotPDF; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} // Delphi 7 cannot display Unicode characters correctly. // You need Delphi 2007 or above to open this file. procedure TForm1.Button1Click(Sender: TObject); begin HotPDF.BeginDoc; HotPDF.FileName := ‘VerticalText.pdf’; HotPDF.CurrentPage.SetFont(‘Arial…

Read More Read More

HotPDF Text Out Sample

HotPDF Text Out Sample

HotPDF component text out sample generates font and character set demonstration, as shown in the image above. program TextOut; {$APPTYPE CONSOLE} uses SysUtils, Graphics, Classes, Windows, HPDFDoc; var HotPDF: THotPDF; OutlineRoot: THPDFDocOutlineObject; CurrnetOutline: THPDFDocOutlineObject; procedure ShowFontGroup ( FontGroup: AnsiString; Position: Integer ); begin HotPDF.CurrentPage.SetFont( FontGroup, [], 12); HotPDF.CurrentPage.TextOut( Position, 60, 0, FontGroup ); HotPDF.CurrentPage.SetFont( FontGroup, [fsBold], 12); HotPDF.CurrentPage.TextOut( Position, 80, 1, FontGroup+’-Bold’ ); // Show font with positive rotation HotPDF.CurrentPage.SetFont( FontGroup, [fsItalic], 12); HotPDF.CurrentPage.TextOut( Position, 100, -1, FontGroup+’-Italic’ ); //…

Read More Read More

HotPDF Hello World Sample

HotPDF Hello World Sample

Hello world from Delphi HotPDF Component! program HelloWorld; {$APPTYPE CONSOLE} uses Windows, Messages, SysUtils, Vcl.Graphics, Classes, HPDFDoc; var HotPDF: THotPDF; Titles: TStrings; Title: String; Window: HWND; begin // Close destination PDF file if opened in Adobe or Fixit PDF readers & editors. Titles := TStringList.Create; Titles.CommaText := ‘”HelloWorld.pdf”, “HelloWorld.pdf – Foxit Reader”, “HelloWorld.pdf – Foxit PhantomPDF”‘; for Title in Titles do begin Window := FindWindow(Nil, PChar(Title)); while Window <> 0 do begin postmessage(Window, WM_CLOSE, 0, 0); Window := FindWindowEx(0, Window,…

Read More Read More