Print Page | Close Window

Page title

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2181
Printed Date: 26 Jun 25 at 8:04PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Page title
Posted By: jcorral
Subject: Page title
Date Posted: 06 Mar 12 at 6:20PM
Hello,

I have a pdf file with 100 pages, I need to get the page title for each page, it´s possible?

Thanks



Replies:
Posted By: AndrewC
Date Posted: 07 Mar 12 at 3:32AM

You will need to use GetPageText() and SetTextExtractionArea() funtions.

http://www.quickpdflibrary.com/help/quickpdf/SetTextExtractionArea.php - http://www.quickpdflibrary.com/help/quickpdf/SetTextExtractionArea.php
http://www.quickpdflibrary.com/help/quickpdf/SetTextExtractionArea.php - http://www.quickpdflibrary.com/help/quickpdf/GetPageText.php

Here is some untested code that will get you started

  string s;

  QP.LoadFromFile("100pages.pdf", "");
  
  for (int i=1;i<=QP.PageCount();i++)
  {
    QP.SelectPage(i);
    QP.SetOrigin(1);

    QP.SetTextExtractionArea(0,0, 600, 100);
    sting s = s.ToString() + ':' + QP.GetPageText(8);
  }


Andrew.


Posted By: Ingo
Date Posted: 07 Mar 12 at 7:37AM
Hi!
 
The properties at SetTextExtractionArea depends on
where the title strings will be.
So it will be try and error (from document to document).
If you want to check always few types of standard documents
this could be a way  but not for common use.
 
Cheers and welcome here,
Ingo
 


Posted By: AndrewC
Date Posted: 07 Mar 12 at 8:59AM
Ingo's comments are very true.  There is no general solution that would work for any document but it sounds like you have a specific document you need to process.

My sample code will get you started.  You will need to adjust the Extraction area as required.

Andrew.


Posted By: jcorral
Date Posted: 07 Mar 12 at 4:01PM
Ok, I will try

thanks 


Posted By: jcorral
Date Posted: 07 Mar 12 at 7:25PM
I do not know if possible, maybe I have not explained well, I need to get the title pages in the markers left window(index)

Thanks




Posted By: Ingo
Date Posted: 07 Mar 12 at 11:18PM

Hi!

I've already thought that this is what you really want...
Have a look in the online-reference at "outlines" or "bookmarks":
http://www.quickpdflibrary.com/help/quickpdf/Outlines.php - http://www.quickpdflibrary.com/help/quickpdf/Outlines.php
Here are samples:
http://help.quickpdflibrary.com/questions/tagged/outline-text.html - http://help.quickpdflibrary.com/questions/tagged/outline-text.html

Cheers, Ingo

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk