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: Error Reversing Page
Date Mon, 14 Aug 2017 17:48:29 GMT
You're reusing the graphics context for several pages without resetting 
it. IMHO you should use a new one each time, but I don't know if this 
strategy applies for JavaFX. Here's some code that solves SOME of your 
problems, but not all:

             AffineTransform transform = new AffineTransform();
             if (g2dfx == null)
             {
                 g2dfx = new FXGraphics2D(gc);
             }
             else
             {
                 transform = g2dfx.getTransform();
             }

             g2dfx.setBackground(java.awt.Color.white);

             renderer.renderPageToGraphics(pagina, g2dfx, 1);
             g2dfx.setTransform(transform);


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


Mime
View raw message