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 > I need help - I can help
  New Posts New Posts RSS Feed - Newbie question on creating and printing a PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Newbie question on creating and printing a PDF

 Post Reply Post Reply
Author
Message
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Topic: Newbie question on creating and printing a PDF
    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?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 07 at 5:08PM
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
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 07 at 8:13AM
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
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