You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Leon Jackson <le...@gmail.com> on 2017/11/17 14:09:32 UTC

Producing PNG of Ghent Workgroup test PDFs

Hi,

I'm trying to produce PNGs of PDF pages in my application, and a
requirement is that the solution can successfully handle the Ghent
workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not looking
good.

I'm using the code below to generate the PNGs









PDDocument pdDocument = PDDocument.load(new
File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf"));
PDFRenderer renderer = new PDFRenderer(pdDocument);
BufferedImage image = renderer.renderImageWithDPI(0, 300, ImageType.RGB);
if (!ImageIO.write(image, "PNG", new FileOutputStream("temp/test.png"))) {
    throw new Exception("Failed to write image '" + image + "'");
}

Does anyone know if it's possible to get PdfBox to handle these PDFs
properly?

Thanks,
Leon

Re: Producing PNG of Ghent Workgroup test PDFs

Posted by Tilman Hausherr <TH...@t-online.de>.
I speak only for myself as a project member, but I think it is rather 
beyond the scope. It would require a new graphics engine. And there are 
so many other things to do where there are issues, e.g. annotations 
rendering, OCG / Structure tree merging, JPX decoder, PDF 2.0, signature 
code, ..... No user ever requested these advanced features, I know about 
them because of the video and because I collect all test files I can get.

Tilman

Am 17.11.2017 um 20:19 schrieb Leon Jackson:
> Thanks for the information. Is this advanced rendering functionality
> something that is beyond the scope/mission of pdfbox, or is it likely to be
> in a future release?
>
>
>
> On Fri, Nov 17, 2017 at 11:14 AM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> Am 17.11.2017 um 17:07 schrieb Tilman Hausherr:
>>
>>> Hi,
>>> We can do many of them but not those that are very advanced (some
>>> transparencies, CMYK blending).
>>> See https://www.youtube.com/watch?v=TiqDqd-1pwU why this is so tricky.
>>>
>> Just to clarify, the video isn't by us, but by a company that can do all
>> these things. But it won't be free.
>>
>> Tilman
>>
>>
>>
>> Tilman
>>> Am 17.11.2017 um 15:09 schrieb Leon Jackson:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to produce PNGs of PDF pages in my application, and a
>>>> requirement is that the solution can successfully handle the Ghent
>>>> workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not
>>>> looking
>>>> good.
>>>>
>>>> I'm using the code below to generate the PNGs
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> PDDocument pdDocument = PDDocument.load(new
>>>> File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf"));
>>>>
>>>> PDFRenderer renderer = new PDFRenderer(pdDocument);
>>>> BufferedImage image = renderer.renderImageWithDPI(0, 300, ImageType.RGB);
>>>> if (!ImageIO.write(image, "PNG", new FileOutputStream("temp/test.png")))
>>>> {
>>>>       throw new Exception("Failed to write image '" + image + "'");
>>>> }
>>>>
>>>> Does anyone know if it's possible to get PdfBox to handle these PDFs
>>>> properly?
>>>>
>>>> Thanks,
>>>> Leon
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>


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


Re: Producing PNG of Ghent Workgroup test PDFs

Posted by Leon Jackson <le...@gmail.com>.
Thanks for the information. Is this advanced rendering functionality
something that is beyond the scope/mission of pdfbox, or is it likely to be
in a future release?



On Fri, Nov 17, 2017 at 11:14 AM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 17.11.2017 um 17:07 schrieb Tilman Hausherr:
>
>> Hi,
>> We can do many of them but not those that are very advanced (some
>> transparencies, CMYK blending).
>> See https://www.youtube.com/watch?v=TiqDqd-1pwU why this is so tricky.
>>
>
> Just to clarify, the video isn't by us, but by a company that can do all
> these things. But it won't be free.
>
> Tilman
>
>
>
> Tilman
>>
>> Am 17.11.2017 um 15:09 schrieb Leon Jackson:
>>
>>> Hi,
>>>
>>> I'm trying to produce PNGs of PDF pages in my application, and a
>>> requirement is that the solution can successfully handle the Ghent
>>> workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not
>>> looking
>>> good.
>>>
>>> I'm using the code below to generate the PNGs
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> PDDocument pdDocument = PDDocument.load(new
>>> File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf"));
>>>
>>> PDFRenderer renderer = new PDFRenderer(pdDocument);
>>> BufferedImage image = renderer.renderImageWithDPI(0, 300, ImageType.RGB);
>>> if (!ImageIO.write(image, "PNG", new FileOutputStream("temp/test.png")))
>>> {
>>>      throw new Exception("Failed to write image '" + image + "'");
>>> }
>>>
>>> Does anyone know if it's possible to get PdfBox to handle these PDFs
>>> properly?
>>>
>>> Thanks,
>>> Leon
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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: Producing PNG of Ghent Workgroup test PDFs

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 17.11.2017 um 17:07 schrieb Tilman Hausherr:
> Hi,
> We can do many of them but not those that are very advanced (some 
> transparencies, CMYK blending).
> See https://www.youtube.com/watch?v=TiqDqd-1pwU why this is so tricky.

Just to clarify, the video isn't by us, but by a company that can do all 
these things. But it won't be free.

Tilman


> Tilman
>
> Am 17.11.2017 um 15:09 schrieb Leon Jackson:
>> Hi,
>>
>> I'm trying to produce PNGs of PDF pages in my application, and a
>> requirement is that the solution can successfully handle the Ghent
>> workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not 
>> looking
>> good.
>>
>> I'm using the code below to generate the PNGs
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> PDDocument pdDocument = PDDocument.load(new
>> File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf")); 
>>
>> PDFRenderer renderer = new PDFRenderer(pdDocument);
>> BufferedImage image = renderer.renderImageWithDPI(0, 300, 
>> ImageType.RGB);
>> if (!ImageIO.write(image, "PNG", new 
>> FileOutputStream("temp/test.png"))) {
>>      throw new Exception("Failed to write image '" + image + "'");
>> }
>>
>> Does anyone know if it's possible to get PdfBox to handle these PDFs
>> properly?
>>
>> Thanks,
>> Leon
>>
>
>
> ---------------------------------------------------------------------
> 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: Producing PNG of Ghent Workgroup test PDFs

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,
We can do many of them but not those that are very advanced (some 
transparencies, CMYK blending).
See https://www.youtube.com/watch?v=TiqDqd-1pwU why this is so tricky.
Tilman

Am 17.11.2017 um 15:09 schrieb Leon Jackson:
> Hi,
>
> I'm trying to produce PNGs of PDF pages in my application, and a
> requirement is that the solution can successfully handle the Ghent
> workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not looking
> good.
>
> I'm using the code below to generate the PNGs
>
>
>
>
>
>
>
>
>
> PDDocument pdDocument = PDDocument.load(new
> File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf"));
> PDFRenderer renderer = new PDFRenderer(pdDocument);
> BufferedImage image = renderer.renderImageWithDPI(0, 300, ImageType.RGB);
> if (!ImageIO.write(image, "PNG", new FileOutputStream("temp/test.png"))) {
>      throw new Exception("Failed to write image '" + image + "'");
> }
>
> Does anyone know if it's possible to get PdfBox to handle these PDFs
> properly?
>
> Thanks,
> Leon
>


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