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!
Newbie question on creating and printing a PDF |
Post Reply |
Author | |
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 26 Mar 07 at 9:18AM |
Hi
I need help getting started. I just want to:
1. Create a new document
2. Draw a Code128 barcode and some text in it
3. Print the document.
Can someone list the necessary QuickPDF function calls I ned to make please?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Colin!
This should help... // Printing ... QP := TiSEDQuickPDF.Create; try QP.UnlockKey('MyLicenceKey'); QP.LoadFromFile(Edit1.text); If QP.Encrypted > 0 Then QP.Unencrypt; pc := QP.PageCount; prName := QP.GetDefaultPrinterName(); If ( Pos(' on ',prName) > 0 ) then prName := System.Copy(prName,1,Pos(' on ',prName)-1); prOptions := QP.PrintOptions(2, 1, Edit1.Text); QP.PrintDocument(prName, 1, pc, prOptions); finally QP.Free; end; // To write text ... QP := TiSEDQuickPDF.Create; try QP.UnlockKey('MyLicenceKey'); QP.DrawText(50, 50, 'Hello World'); //left and top in pixels, 'Hello World' QP.SaveToFile(Edit1.Text); finally QP.Free; end; // Barcode ... Please use DrawBarcode. About the syntax you can read in the reference: http://www.quickpdf.org/forum/forum_posts.asp?TID=668 Best regards, Ingo Edited by Ingo - 26 Mar 07 at 5:10PM |
|
marian_pascalau
Debenu Quick PDF Library Expert Joined: 28 Mar 06 Location: Germany Status: Offline Points: 278 |
Post Options
Thanks(0)
|
Hi there,
I dear to suggest some changes:
if QP.UnlockKey('MyLicenceKey') <> 1 then
raise Exception.Create('Invalid license key');
if (QP.LoadFromFile(Edit1.text) <> 1 then
raise Exception.Create('Cannot load PDF file: ' + Edit1.text);
Best regards, Marian |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store