pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: content stream setGraphicsStateParameters gives null pointer
Date Wed, 16 Aug 2017 11:16:55 GMT

> Am 16.08.2017 um 13:14 schrieb chitgoks <chitgoks@gmail.com>:
> 
> hi maruan. it is actually not null. it draws the shape and color as
> intended. just not transparent.

then I'd need a little more code and the stacktrace - even better would be a PDF to start
from to reproduce (upload it to a public location).
BR
Maruan

> 
> i added those 3 lines for transparency then i get that null pointer.
> 
> Website/Java Games: http://www.chitgoks.com
> My Blogs:
> http://tech.chitgoks.com
> http://wuhtevah.chitgoks.com
> http://disneyusa.blogspot.com
> 
> On Wed, Aug 16, 2017 at 7:10 PM, Maruan Sahyoun <sahyoun@fileaffairs.de>
> wrote:
> 
>> 
>>> Am 16.08.2017 um 13:00 schrieb chitgoks <chitgoks@gmail.com>:
>>> 
>>> hi. anyone got ideas why i get a nullpointer when my code looks like
>> this?
>>> 
>>> square is a PDAnnotation object.
>>> 
>>> cs.setStrokingColor(square.getInteriorColor());
>>> cs.setNonStrokingColor(square.getInteriorColor());
>> 
>> getInteriorColor() might be null if the annotations dictionary doesn't
>> have such an entry
>> 
>> BR
>> Maruan
>> 
>>> 
>>> PDExtendedGraphicsState graphicsState = new PDExtendedGraphicsState();
>>> graphicsState.setStrokingAlphaConstant(0.3f);
>>> cs.setGraphicsStateParameters(graphicsState);
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message