You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by jl...@gi-bon.sk on 2016/06/29 17:21:36 UTC

multithreading in PDFBox 2.0

Hi,
I used to work with PDFBox 1.8, and it was not thread safe. Like rendering 
of multiple pages at the same time was not possible (not reliable).
The only way was to create new PDDocument of that single file in every 
thread.

Is there any changes in PDFBox 2.0 in this respect?
Is it possible to render pages to images in multiple threads? (without 
opening new PDDocument in every thread)


Best regards
Juraj Lonc


---
Táto správa bola skontrolovaná na prítomnosť vírusov programom Avast Antivirus.
https://www.avast.com/antivirus

Re: multithreading in PDFBox 2.0

Posted by John Hewson <jo...@jahewson.com>.
> On 29 Jun 2016, at 10:26, Tilman Hausherr <TH...@t-online.de> wrote:
> 
>> Am 29.06.2016 um 19:21 schrieb jlonc@gi-bon.sk:
>> Hi,
>> I used to work with PDFBox 1.8, and it was not thread safe. Like rendering
>> of multiple pages at the same time was not possible (not reliable).
>> The only way was to create new PDDocument of that single file in every
>> thread.
>> 
>> Is there any changes in PDFBox 2.0 in this respect?
>> Is it possible to render pages to images in multiple threads? (without
>> opening new PDDocument in every thread)
> 
> No.

Unofficially reading different pages from a single PDDocument does now support multi-threading, so you can share a PDDocument between threads and create a PDFRenderer on each thread.

-- John

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

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


Re: multithreading in PDFBox 2.0

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 29.06.2016 um 19:21 schrieb jlonc@gi-bon.sk:
> Hi,
> I used to work with PDFBox 1.8, and it was not thread safe. Like rendering
> of multiple pages at the same time was not possible (not reliable).
> The only way was to create new PDDocument of that single file in every
> thread.
>
> Is there any changes in PDFBox 2.0 in this respect?
> Is it possible to render pages to images in multiple threads? (without
> opening new PDDocument in every thread)

No.

Tilman


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