Skip to content

Instantly share code, notes, and snippets.

@edsonalvesan
Created April 21, 2018 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsonalvesan/e56349ad0fc29708491fabd0325110b0 to your computer and use it in GitHub Desktop.
Save edsonalvesan/e56349ad0fc29708491fabd0325110b0 to your computer and use it in GitHub Desktop.
var
PDF : TPDFDocumentGDI;
Page : TPDFPage;
begin
PDF := TPdfDocumentGDI.Create();
try
PDF.Info.Author := 'Fábio Feltrin da Silveira';
PDF.Info.CreationDate := now;
PDF.Info.Creator := 'Fábio Feltrin da Silveira';
PDF.Info.Subject := 'teste';
PDF.Info.Title := 'PDF teste de impressão';
Page := PDF.AddPage;
Page.PageLandscape := false;
PDF.DefaultPaperSize := psA4;
PDF.VCLCanvas.TextOut(100,100,'Texto que será visualizado no PDF para verificar se realmente funciona');
PDF.VCLCanvas.TextOut(200,500,'feltrin');
PDF.SaveToFile('c:\teste.pdf');
finally
PDF.Free;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment