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

DrawText Question

 Post Reply Post Reply
Author
Message
JohnT View Drop Down
Team Player
Team Player


Joined: 23 Oct 13
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnT Quote  Post ReplyReply Direct Link To This Post Topic: DrawText Question
    Posted: 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
Back to Top
JohnT View Drop Down
Team Player
Team Player


Joined: 23 Oct 13
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnT Quote  Post ReplyReply Direct Link To This Post Posted: 25 Feb 14 at 6:22PM
SORRY!
It works...the horizontal number (700) was pushing the numbering off of the page.
JohnEmbarrassed
Back to Top
JohnT View Drop Down
Team Player
Team Player


Joined: 23 Oct 13
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnT Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member


Joined: 29 Mar 11
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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. "

Back to Top
JohnT View Drop Down
Team Player
Team Player


Joined: 23 Oct 13
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnT Quote  Post ReplyReply Direct Link To This Post Posted: 25 Feb 14 at 10:51PM
JpBro,

Thanks very much.

That fixed it!

John
Back to Top
jpbro View Drop Down
Senior Member
Senior Member


Joined: 29 Mar 11
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 Feb 14 at 1:23AM
Glad to help!
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