Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > Sample Code
  New Posts New Posts RSS Feed - Create a One page PDF with a line of text
  FAQ FAQ  Forum Search   Register Register  Login Login

Create a One page PDF with a line of text

 Post Reply Post Reply
Author
Message
ZarkoGajic View Drop Down
Beginner
Beginner
Avatar

Joined: 18 Mar 09
Location: Croatia
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote ZarkoGajic Quote  Post ReplyReply Direct Link To This Post Topic: Create a One page PDF with a line of text
    Posted: 19 Mar 09 at 6:25AM
Can someone share some Delphi source code for the next task:
 
Create a one page PDF document (A4, landscape) with centered text in the middle of the page (horizontal / vertical). Text can be for example "Created with Quick PDF"
 
-zarko gajic
-zarko gajic
Back to Top
deabrew View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Jan 09
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote deabrew Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 09 at 7:18AM
procedure TfrmMain.Button1Click(Sender: TObject);
var
QP: TQuickPDF0712;
begin
QP := TQuickPDF0712.Create;
try
   QP.UnlockKey(' key goes here ');

   // Set the page size of the default document
   QP.SetPageSize('A4 Landscape');

   // Set centered horizontal alignment
   QP.SetTextAlign(1);

   // Draw the text centered on the page, the final
   // 0 parameter is for centered vertical alignment
   QP.DrawTextBox(0, QP.PageHeight, QP.PageWidth, QP.PageHeight,
     'Created with Quick PDF Library', 0);

   QP.SaveToFile('filename.pdf');
finally
   QP.Free;
end;
end;

Back to Top
ZarkoGajic View Drop Down
Beginner
Beginner
Avatar

Joined: 18 Mar 09
Location: Croatia
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote ZarkoGajic Quote  Post ReplyReply Direct Link To This Post Posted: 19 Mar 09 at 11:20AM
Great, thanks!
-zarko gajic
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store