Hi Manfred, PageDrawer isn’t going to perform well when drawing directly to an on-screen buffer. You’d be better off drawing to a BufferedImage and drawing and clipping that into your on-screen Graphics2D.
Cheers, -- John > On 12 Jan 2015, at 02:04, Manfred Pock <pock.manf...@gmail.com> wrote: > > Hello, > > we use the Pdfbox to viewing pdf's in our software. Actually we use the > version 1.6.0 in general it works fine (excepts memory and perfomance > problem). But in last time we have problems to show different pdf's and so we > decite to switch direct version of the trunk to get the latest features. All > problem-pdf's can be viewed now. > > But we have a problem with the viewing size. We has embedded the PageDrawer > in an JScrollpane and added some zooming-feature to our pdfviewer. There we > have the problem that the PageDrawer paint also outside of der viewing Area > of der Scrollpane. It seem to be a problem in the PdfStreamEngine (line 130). > For the clipping it uses the PDGraphicsState setted in the graphicStack. This > one is set to the size of the CropBox. To set the CropBox outside have some > side-effects and to not work. A solution, that work for us, is to give with > parameters that define the actually viewing area. > > It's possible to integrate something like this? > > best regarts, Manfred