Print Page | Close Window

Determining empty region in a PDF for barcode plac

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=3600
Printed Date: 04 May 24 at 4:23PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Determining empty region in a PDF for barcode plac
Posted By: Bernd
Subject: Determining empty region in a PDF for barcode plac
Date Posted: 23 Aug 18 at 7:44PM

Is there a practical method to determine an empty region in a PDF in order to place a QR Code programmatically?

Thank you for your help!




Replies:
Posted By: tfrost
Date Posted: 23 Aug 18 at 9:30PM
Personally, since I deal regularly with PDF to bi-level bitmap conversion, I would simply render the PDF to a single-bit-per-pixel BMP and walk through the scan lines looking for runs of bytes containing 0xff values. But that is a messy solution, especially if you do not have the tools to hand, or do not have familiarity with twiddling bitmap bits at a low level. And it also does not help if your definition of 'empty' embraces a 'light gray' block as well as plain white, unless you have available a "nearest to black/white" dithering algorithm.  So it is practical for me, but might not be for you. But I would demand a high fee if someone asked me to code a tedious task like this anyway!



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