You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Petr Kavánek <ka...@extech.eu> on 2019/11/29 15:24:39 UTC
Rendering performance for small part of page
Hello,
I would like to use PDFBox to render technical plans in our editor on background. To achieve smooth scrolling I need to be able to paint only visible part of the PDF which might contain only small part of the whole PDF. We can achieve it via setting CropBox, but unfortunately it looks like it doesn’t affect rendering performance. Method renderPageToGraphics takes same time no matter if whole page is rendered or small part of it.
So to me it looks like, even when CropBox is set the painting is done for whole content and there is no performance boost.
Is there some way how to basically achieve that rendering of only 10% of page will take 10% of time needed to render whole page?
Best regards,
Petr Kavánek
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: Rendering performance for small part of page
Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,
No, PDFBox always works through the whole page, and doesn't take into
account whether a part is displayed or not. The cropbox is just a clipping.
Tilman
PS: such questions rather belong on the users@ list.
Am 29.11.2019 um 16:24 schrieb Petr Kavánek:
> Hello,
>
> I would like to use PDFBox to render technical plans in our editor on background. To achieve smooth scrolling I need to be able to paint only visible part of the PDF which might contain only small part of the whole PDF. We can achieve it via setting CropBox, but unfortunately it looks like it doesn’t affect rendering performance. Method renderPageToGraphics takes same time no matter if whole page is rendered or small part of it.
>
> So to me it looks like, even when CropBox is set the painting is done for whole content and there is no performance boost.
>
> Is there some way how to basically achieve that rendering of only 10% of page will take 10% of time needed to render whole page?
>
> Best regards,
> Petr Kavánek
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org