Print Page | Close Window

Finding extents of printable entities

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


Topic: Finding extents of printable entities
Posted By: jacob.hoover
Subject: Finding extents of printable entities
Date Posted: 24 Mar 10 at 2:24PM
I was wondering if anyone has ever used (or if it's even possible) the QuickPDF library to fid the extents of visible entities of a PDF document.

What I am trying to do is merge multiple pages together but only taking the sections with visible elements from each page. Our existing code base uses another library to vectorize the PDF to an image, and then the image is scanned line by line for any pixel that isn't of the background color.

I'm thinking there has to be an easier way of detecting the extents of entities in a native format, but I have yet to find a method that works.  (I thought I was close with http://www.quickpdflibrary.com/help/quickpdf/GetPageBox.php, but it always returns the full extents of the PDF [page width/height])



Replies:
Posted By: jacob.hoover
Date Posted: 25 Mar 10 at 4:04PM
I'm seeing a few looks but no comments.  Is my question not clear enough, or is there no way that anyone knows of to get the extents of visible entities in a PDF?

Thanks,
Jacob


Posted By: Paddy
Date Posted: 25 Mar 10 at 4:12PM
Can you provide more info on what you mean by "visible entities" exactly?


Posted By: jacob.hoover
Date Posted: 25 Mar 10 at 5:39PM
  For a more simplified view, assume I have a single page PDF with only a single line drawn on it from one inch in from the left side of the page and one inch down from the top of the page, to seven and a half inches in from the left side of the page and ten inches from the top of the page.  Given that, I would like to get the extents of the page and have this return a rectangle with the top left point being (1,1) and the bottom right point being (7.5, 10).




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