Voila une classe qui genere du pdf ...
utilisation:
var
Pdf: TWPdf;
F: TextFile;
begin
...
Pdf:= TWPdf.TCreate('Pdf');
...
Pdf. (Une Propriete ou methode);
...
AssignFile(F,savedialog.FileName + '.pdf');
Rewrite(F);
Writeln(F,Pdf.RetBuff());
CloseFile(F);
...
Pdf.Free;
-------------------------------------- -------------------------------------------------- ------
Liste des fonctions et proprietes
constructor TCreate(InstanceName: String); //Constructeur de la classe
property CPage: IndexP0 read _ReadCPage write _WriteCPage;
property CUnit: SUnit read _ReadCUnit write _WriteCUnit;
property Producer: String read _ReadProducer write _WriteProducer;
property Title: String read _ReadTitle write _WriteTitle;
property Subject: String read _ReadSubject write _WriteSubject;
property Author: String read _ReadAuthor write _WriteAuthor;
property Keywords: String read _ReadKeywords write _WriteKeywords;
property OneError: Boolean read _ReadOneError write _WriteOneError;
property GiveError: GiveErrorType read _ReadGiveError write _WriteGiveError;
property HFillColor: HRGB read _ReadHFillColor write _WriteHFillColor;
property HDrawColor: HRGB read _ReadHDrawColor write _WriteHDrawColor;
property DFillColor: DRGB read _ReadDFillColor write _WriteDFillColor;
property DDrawColor: DRGB read _ReadDDrawColor write _WriteDDrawColor;
property PFillColor: PRGB read _ReadPFillColor write _WritePFillColor;
property PDrawColor: PRGB read _ReadPDrawColor write _WritePDrawColor;
property LineWidth: Integer read _ReadLineWidth write _WriteLineWidth;
property Font: String read _ReadFont write _WriteFont;
property FontSize: Double read _ReadFontSize write _WriteFontSize;
property X: Double read _ReadX write _WriteX;
property Y: Double read _ReadY write _WriteY;
procedure Text(X,Y: Double; Text:String);
procedure AText(Text: String; Align: String; Para: String);
procedure Br(Nb: Cardinal);
procedure SetTable(Row: IndexT0; Cols: IndexT0; Value: String; Align: String1; Valign: String1);
procedure ClearTable();
procedure Aray();
procedure Line(X1, Y1, X2, Y2: Double);
procedure Rect(X, Y, Width, Height: Double; Style: String);
procedure MovePage(Current: IndexP1; Destination: IndexP1);
procedure IncertPage(PageNb: IndexP1; Location: String);
procedure SuppPage(PageNb: IndexP1);
function PageDim(Page: IndexP1): PageSize;
procedure SetPageDim(Page: IndexP1; H: Double; W: Double; MargX: Double; MargY: Double);
function GetStrWidth(Text: String): Double;
function RetPRGB(R,G,B: Double):PRGB;
function RetHRGB(R,G,B: String):HRGB;
function RetDRGB(R,G,B: Double):DRGB;
function RetBuff(): String;