Print Page | Close Window

Remove Header/Footer from GetPageText()?

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=1955
Printed Date: 04 Apr 26 at 11:47AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Remove Header/Footer from GetPageText()?
Posted By: cdoan
Subject: Remove Header/Footer from GetPageText()?
Date Posted: 13 Sep 11 at 7:21PM
Hello,

   I have a document that has page headers and footers on each page (ie, page number, chapter title, etc).  What I've noticed in using GetPageText() is that the header AND footer are processed first, then the body of the page follows.  Is there any way for QuickPDF to identify the header and footer so I can ignore them using GetPageText()?

   If I can't identify the header/footer easily from GetPageText(), I guess the next best thing would be to physically remove the header and footer from the PDF internally, then run GetPageText().  In which case, can someone point me in the right direction to manipulate the headers/footers?  I checked around for something that looked like a header, but maybe they are called something else in PDFland.  Thanks!


cdoan



Replies:
Posted By: AndrewC
Date Posted: 14 Sep 11 at 8:41AM
Most pdf files have no concept of headers, footers, paragraphs or even words.  PDF's are created with a series of drawing commands and can be put together in any randdom order just like a jigsaw puzzle.

If the header and footer are always in the same size and format of the page then you could remove all the text objects on the page that have a bounding box that falls inside some pre-defined areas.


Posted By: cdoan
Date Posted: 14 Sep 11 at 4:28PM
AndrewC,

    That (unfortunately) makes a lot of sense.  I'll give the fixed bounding box idea a go... there might be some corner cases, but I'll deal with them individually.  Thanks!


cdoan.



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