Print Page | Close Window

Get margin size help

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


Topic: Get margin size help
Posted By: BGJ223
Subject: Get margin size help
Date Posted: 03 Oct 13 at 5:22PM
Hi I am trying to get margin size for several PDF files.  Basically I want to know which files have a margin size smaller/larger than 1/4 inch.

I am trying to do this in VB script, but I need some help finding the correct function and syntax to make this work.  

Thanks



Replies:
Posted By: AndrewC
Date Posted: 04 Oct 13 at 9:24AM
PDF Files technically do not have margins, paragraphs, lines of text.  It is build like a jigsaw puzzle where each bit of text is put down onto the page 1 character / line / image etc at a time.

One way you might be able to achieve what you want is to load the PDF, render it to a BMP format and then scan the BMP to locate the first row / column that contains a pixel that is not white.  Repeat that for all four sides then you might have the margin values you are looking for.

Andrew.



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