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 - the end of text
  FAQ FAQ  Forum Search   Register Register  Login Login

the end of text

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


Joined: 19 Jul 13
Location: Russia
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote liveny Quote  Post ReplyReply Direct Link To This Post Topic: the end of text
    Posted: 19 Jul 13 at 5:19AM

Hi, guys!

I need to add  a signature to the end of text. But  I don't know the length of the text  in advance. Is it possible to determine the end programmatically?

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 (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jul 13 at 8:13PM
Hi Liveny!

Why not try this one:
You can add a signature to a file and it doesn't matter where your textcontent is.

The length of your text you can determine while using the textextraction counting the characters.

Cheers and welcome here,
Ingo

Back to Top
liveny View Drop Down
Beginner
Beginner


Joined: 19 Jul 13
Location: Russia
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote liveny Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jul 13 at 11:47PM
Hi! thx for your answer. May be I didn't make myself clear. The point is I don't need  a DIGITAL signature. I want to add facsimile. =) 
Back to Top
liveny View Drop Down
Beginner
Beginner


Joined: 19 Jul 13
Location: Russia
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote liveny Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jul 13 at 5:42AM
In short,  I want to add text to the end of the document.  
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: 24 Jul 13 at 11:23AM
So do it ... ;-)
Automatically it will be added to the end.

Back to Top
liveny View Drop Down
Beginner
Beginner


Joined: 19 Jul 13
Location: Russia
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote liveny Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jul 13 at 5:11AM
 ;-) Thx, but in my case, text added in the end of PAGE no matter what I used. Eventually I solved this problem by using GetPageText(3) - I just calculate the y-coordinate of the last  line.  If there is another way to do it, so, would you please..  ^.^ 
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 13 at 11:52AM
liveny,

The method you have used is the only real method.  A PDF file doesn't contain paragraphs and word positions in the way that MS Word would.  A PDF is made up of jigsaw pieces and each piece has a location of where it goes on the page.  GetPageText finds all the pieces and tries to group them together into words and lines but it is not always perfect as it is not an exact science.  For a simple letter it is more than adequate and the only real method to use.

Your code might be a little simpler if you use the Text Blocks functions.  He is some simple sample code.

            QP.LoadFromFile("aaa.pdf", "");
            for (int i = 1;i<=QP.PageCount();i++)
            {
                QP.SelectPage(i);
                int id = QP.ExtractPageTextBlocks(3);
                for (int w=1;w<=QP.GetTextBlockCount(id);w++)
                {
                    double size = QP.GetTextBlockFontSize(id, w);

                     MessageBox.Show("Page :" + i.ToString() + " Word:" + w.ToString() + "'" + QP.GetTextBlockText(id, w) + "'");
                }
                QP.ReleaseTextBlocks(id);
            }




Andrew.
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