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!
Trouble with DrawText |
Post Reply |
Author | |
DougKnudson
Beginner Joined: 23 Jul 09 Location: Raleigh, NC Status: Offline Points: 4 |
Post Options
Thanks(0)
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
Thanks,
Doug
|
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
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.
|
|
DougKnudson
Beginner Joined: 23 Jul 09 Location: Raleigh, NC Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Rowan,
Thanks very much. I appreciate your help!
Doug
|
|
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