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 - Trouble with DrawText
  FAQ FAQ  Forum Search   Register Register  Login Login

Trouble with DrawText

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

Joined: 23 Jul 09
Location: Raleigh, NC
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougKnudson Quote  Post ReplyReply Direct Link To This Post Topic: Trouble with DrawText
    Posted: 23 Jul 09 at 8:10PM
Hi All,
I am very new to QuickPDF but like it very much so far.  I am having trouble with DrawText not behaving as I believe it should and any help would be greatly appreciated!  I would like to insert some text at a particular position on an existing page that contains existing text.  Maybe this is not possible to write text over top (new text layer?) of existing text?  Here is how I am trying to do it in Visual Studio C++ Ver 6:
 
 if (msp_pdf_control.CreateInstance("QuickPDFAX0714.PDFLibrary") != 0)
  {
  MB("Sorry... Could not instantiate the QuickPDF control!");
  return false;
  }
 int success = msp_pdf_control->UnlockKey("jg6je64u3pj5x57ed8438p36y");
 
 msp_pdf_control->SetMeasurementUnits(2);
 msp_pdf_control->LoadFromFile("C:\\Test.pdf");
 msp_pdf_control->DrawText(2,2,"Some Text to Draw");
 msp_pdf_control->SaveToFile("C:\\Test.pdf");
 
 
The text is written to the document but it is ALWAYS written in the absolute lower left corner.  I have tried different positions for the text, I have tried not setting measurement units, I have tried writing on existing pages (with text) and on newly inserted empty pages but always get the text in the lower left.
 
Anything to point me in the right direction would sure be appreaciated Smile
 
Thanks,
Doug
 
 
 
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jul 09 at 12:11AM
Hi Doug,

You need to use the SetOrigin function to set the origin for drawing operations. The default origin is bottom left (and the X and Y co-ordinates are 0,0), but you can also choose to use the top left, top right and bottom right, as the origin for the X and Y co-ordinates.

Cheers,
- Rowan.
Back to Top
DougKnudson View Drop Down
Beginner
Beginner
Avatar

Joined: 23 Jul 09
Location: Raleigh, NC
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougKnudson Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jul 09 at 3:09PM
Rowan,
 
Thanks very much.  I appreciate your help!
 
Doug
 
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