pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chitgoks <chitg...@gmail.com>
Subject Re: content stream setGraphicsStateParameters gives null pointer
Date Wed, 16 Aug 2017 11:14:06 GMT
hi maruan. it is actually not null. it draws the shape and color as
intended. just not transparent.

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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message