pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Coppex <g.cop...@gmail.com>
Subject Re: Re: PDFBox drawXObject alpha channel
Date Fri, 09 Jan 2015 09:36:23 GMT
Thanks it worked perfectly.

I had however to create the GraphicsStates Map (HashMap called "map").



PDExtendedGraphicsState gs1 = new PDExtendedGraphicsState();
gs1.setNonStrokingAlphaConstant(.33f);
HashMap<String, PDExtendedGraphicsState> map = new HashMap<String,
PDExtendedGraphicsState>();
map.put("gs1", gs1);
currPage.findResources().setGraphicsStates(map);

...


contentStream.saveGraphicsState();
contentStream.appendRawCommands("/gs1 gs\n");
contentStream.drawXObject(otherDoc, transform);
contentStream.restoreGraphicsState();




Thanks a lot

Best regards,

G. Coppex

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