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:10:47 GMT

> 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


Mime
View raw message