Print Page | Close Window

where is getFillColor?

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=2286
Printed Date: 28 Sep 24 at 10:10PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: where is getFillColor?
Posted By: toran
Subject: where is getFillColor?
Date Posted: 01 Jun 12 at 5:12PM
I need to find out the current background color of a pdf document. There is a setFillColor function, but I can't find the setter. Is there such a thing or the white color is assumed to be the default background color unless changed?
 
Thanks



Replies:
Posted By: Ingo
Date Posted: 01 Jun 12 at 8:26PM
Hi Toran!

There isn't a get available.
Render the page to a thumbnail-jpg and then
check few pixels near the frame - so you can
get the color. Not a save method ;-)

Cheers, Ingo


Posted By: toran
Date Posted: 02 Jun 12 at 3:06AM
Thanks, Ingo!
 
Interesting approach. :) Do you think that missing getter is because of Pdf specs ?


Posted By: edvoigt
Date Posted: 02 Jun 12 at 11:02AM
Hi Toran,

that's no question of PDF-specifications. What you call the PDF-background does not exists as an single, well defined object. What is the background (and his color), if you fill it as half with any color and on the other half with an image?

So it can give only the answer for the question: which color has a pixel at position x,y? And inside this question is a parameter, the size (scale) used for rendering.

So what Ingo said is the only possible (but very unsure) approach. The problem is the question, not the answer.


Cheers,

Werner



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