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!
![]() |
DrawText Question |
Post Reply
|
| Author | |
JohnT
Team Player
Joined: 23 Oct 13 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Topic: DrawText QuestionPosted: 25 Feb 14 at 5:06PM |
|
The following Delphi code works in single generated PDF's, but not merged and scanned PDFs.
The code simply adds a page numbers to the top of each page of the merged document. I have verified that the code/loop is executing. if UnlockResult = 1 then If PDFLibrary.LoadFromFile(OutputFullFilename,'') <> 0 then begin CurrentPage := 2; PageCounter := PDFLibrary.PageCount; PDFLibrary.SetPageSize('Legal'); PDfLibrary.SetTextSize(4); PDFLibrary.SetNeedAppearances(1); PDFLibrary.SetTextUnderline(1); For CurrentPage := 2 to PageCounter do begin PDFLibrary.SelectPage(CurrentPage); PDFLibrary.SetOrigin(1); PDFLibrary.DrawText(700,10,'Merged Page ' + IntToStr(CurrentPage) + ' of ' + IntToStr(PageCounter)); end; PDFLibrary.SaveToFile(OutputFullFilename); end; ///load check TIA, John
|
|
![]() |
|
JohnT
Team Player
Joined: 23 Oct 13 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Feb 14 at 6:22PM |
|
SORRY!
It works...the horizontal number (700) was pushing the numbering off of the page. John
|
|
![]() |
|
JohnT
Team Player
Joined: 23 Oct 13 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Feb 14 at 7:49PM |
|
One clarification...
The drawtext method does not appear to work with PDF's that originated as scans of hard copy. What am I missing? TIA, John
|
|
![]() |
|
jpbro
Senior Member
Joined: 29 Mar 11 Status: Offline Points: 77 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Feb 14 at 9:10PM |
|
Try calling the NormalizePage function before drawing your text on the scanned documents - they might have rotation applied.
Here's the documentation on the NormalizePage function: http://www.debenu.com/docs/pdf_library_reference/NormalizePage.php Of note in the description of the function: "Moves and/or rotates the contents of the page so that subsequent drawing operations are at the expected position on the page. " |
|
![]() |
|
JohnT
Team Player
Joined: 23 Oct 13 Location: United States Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Feb 14 at 10:51PM |
|
JpBro,
Thanks very much. That fixed it! John
|
|
![]() |
|
jpbro
Senior Member
Joined: 29 Mar 11 Status: Offline Points: 77 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 Feb 14 at 1:23AM |
|
Glad to help!
|
|
![]() |
|
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