pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Implementing transparency for watermarks in writing PDF
Date Mon, 31 Aug 2015 22:56:43 GMT
Am 01.09.2015 um 00:24 schrieb Rakshit Ashtekar:
> //deprecated method in 2.0
> //contentStream.appendRawCommands("/TransparentState gs\n");

You could use

setGraphicsStateParameters(PDExtendedGraphicsState state)

from the source code

public void setGraphicsStateParameters(PDExtendedGraphicsState state) 
throws IOException
     {
         writeOperand(resources.add(state));
         writeOperator("gs");
     }


you don't even have to add it to the resources yourself.

(I didn't test this. If it still doesn't work, try to create a "good" 
PDF with deprecated methods, and a "bad" PDF. We could then analyse the 
difference with PDFDebugger)


Tilman

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


Mime
View raw message