HotPDF Canvas Draw

This HotPDF Component Sample draw plots with Delphi TCanvas.

program CanvasDraw;
{$APPTYPE CONSOLE}
uses
{$IFDEF VER230} System.SysUtils, System.Classes, Vcl.Graphics, {$ELSE} SysUtils, Classes, Graphics, {$ENDIF} HPDFDoc;

var
I, Y: Integer;
HotPDF: THotPDF;

begin
HotPDF:= THotPDF.Create(nil);
try
Randomize;
HotPDF.AutoLaunch := true;
HotPDF.FileName := ‘CanvasDraw.pdf’;
HotPDF.BeginDoc; // Create PDF file
HotPDF.Canvas.Font.Size := 14; // Set canvas font size
I :=20;Continue Reading …

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;Continue Reading …

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;Continue Reading …

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’,Continue Reading …

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;Continue Reading …

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,Continue Reading …

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.Continue Reading …

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 );Continue Reading …

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”,Continue Reading …