You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Matt Pryor <pr...@international-presence.com> on 2014/06/13 10:50:07 UTC
PDFImageWriter
Hello,
Do you know if there is an issue with PDFImageWriter for searchable PDFs? I
have attached an example PDF, and the following code:
PDFImageWriter imageWriter = new PDFImageWriter();
PDDocument document = PDDocument.load(new
File("c:\\temp\\fax-2014-06-11-16_04_47.pdf"));
int numPages = document.getNumberOfPages();
imageWriter.writeImage(document, "jpg", null,
1, numPages, "c:\\temp\\pdftoimage", BufferedImage.TYPE_BYTE_BINARY,
Toolkit.getDefaultToolkit().getScreenResolution());
document.close();
Which appears to render a blank image.
If I use a non-searchable PDF it renders correctly.
Many thanks in advance for any suggestions.
--
--
Matt Pryor
The International Presence Group of Companies
Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
Surrey KT6 5NE
TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
TEL US: +1 321 726 9941, FAX +1 321 726 6210
EMAIL: pryor@presencebpm.com
URL: www.International-presence.com
International Presence Limited: Registered in England and Wales No.3709669
This E-mail and any attachments transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient please destroy this
message and kindly notify the sender by reply E-Mail. Opinions, conclusions
and other information in this message that do not relate to the official
business of International Presence Limited do not necessarily reflect the
views of the company.
International Presence Ltd
Unit 10, Coppergate Mews
Surbiton
Surrey KT6 5NE
Re: PDFImageWriter
Posted by Matt Pryor <pr...@international-presence.com>.
Yes, that fixed it.
Thanks very much for your help.
Matt
On 13 June 2014 14:59, Tilman Hausherr <TH...@t-online.de> wrote:
> I get "Can't find an ImageIO plugin to decode the JBIG2 encoded
> datastream" ==>
> Please try again by putting the levigo JBIG2 decoder in your class path.
> https://code.google.com/p/jbig2-imageio/
> Tilman
>
> Am 13.06.2014 15:53, schrieb Matt Pryor:
>
> Thanks for the reply, Tilman.
>>
>> I've uploaded the document to:
>>
>> http://www.international-presence.com/matt/fax-2014-06-11-16_04_47.pdf
>>
>> Tried using loadNonSeq method instead and still no joy.
>>
>> Many thanks
>> Matt
>>
>>
>>
>>
>>
>>
>> On 13 June 2014 12:14, Tilman Hausherr <TH...@t-online.de> wrote:
>>
>> Hi,
>>>
>>> Most attachments are deleted here.
>>>
>>> Alternatives:
>>> - upload it somewhere
>>> - send it to me
>>> - open an issue with JIRA
>>>
>>> Btw use loadNonSeq(..., null) which cures some problems.
>>>
>>> Tilman
>>>
>>> Am 13.06.2014 10:50, schrieb Matt Pryor:
>>>
>>> Hello,
>>>>
>>>> Do you know if there is an issue with PDFImageWriter for searchable
>>>> PDFs?
>>>> I have attached an example PDF, and the following code:
>>>>
>>>> PDFImageWriter imageWriter = new PDFImageWriter();
>>>> PDDocument document = PDDocument.load(new File("c:\\temp\\fax-
>>>> 2014-06-11-16_04_47.pdf"));
>>>> int numPages = document.getNumberOfPages();
>>>> imageWriter.writeImage(document, "jpg", null,
>>>> 1, numPages, "c:\\temp\\pdftoimage", BufferedImage.TYPE_BYTE_BINARY,
>>>> Toolkit.getDefaultToolkit().getScreenResolution());
>>>> document.close();
>>>>
>>>> Which appears to render a blank image.
>>>>
>>>> If I use a non-searchable PDF it renders correctly.
>>>>
>>>> Many thanks in advance for any suggestions.
>>>>
>>>> --
>>>> --
>>>> Matt Pryor
>>>>
>>>> The International Presence Group of Companies
>>>> Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
>>>> Surrey KT6 5NE
>>>>
>>>> TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
>>>> TEL US: +1 321 726 9941, FAX +1 321 726 6210
>>>> EMAIL: pryor@presencebpm.com <ma...@presencebpm.com>
>>>>
>>>> URL: www.International-presence.com <http://www.International-
>>>> presence.com>
>>>>
>>>>
>>>> International Presence Limited: Registered in England and Wales
>>>> No.3709669
>>>>
>>>> This E-mail and any attachments transmitted with it are confidential and
>>>> intended solely for the use of the individual or entity to whom they are
>>>> addressed. If you are not the intended recipient please destroy this
>>>> message and kindly notify the sender by reply E-Mail. Opinions,
>>>> conclusions
>>>> and other information in this message that do not relate to the official
>>>> business of International Presence Limited do not necessarily reflect
>>>> the
>>>> views of the company.
>>>>
>>>> International Presence Ltd
>>>> Unit 10, Coppergate Mews
>>>> Surbiton
>>>> Surrey KT6 5NE
>>>>
>>>>
>>>
>>
>
--
--
Matt Pryor
The International Presence Group of Companies
Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
Surrey KT6 5NE
TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
TEL US: +1 321 726 9941, FAX +1 321 726 6210
EMAIL: pryor@presencebpm.com
URL: www.International-presence.com
International Presence Limited: Registered in England and Wales No.3709669
This E-mail and any attachments transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient please destroy this
message and kindly notify the sender by reply E-Mail. Opinions, conclusions
and other information in this message that do not relate to the official
business of International Presence Limited do not necessarily reflect the
views of the company.
International Presence Ltd
Unit 10, Coppergate Mews
Surbiton
Surrey KT6 5NE
Re: PDFImageWriter
Posted by Tilman Hausherr <TH...@t-online.de>.
I get "Can't find an ImageIO plugin to decode the JBIG2 encoded
datastream" ==>
Please try again by putting the levigo JBIG2 decoder in your class path.
https://code.google.com/p/jbig2-imageio/
Tilman
Am 13.06.2014 15:53, schrieb Matt Pryor:
> Thanks for the reply, Tilman.
>
> I've uploaded the document to:
>
> http://www.international-presence.com/matt/fax-2014-06-11-16_04_47.pdf
>
> Tried using loadNonSeq method instead and still no joy.
>
> Many thanks
> Matt
>
>
>
>
>
>
> On 13 June 2014 12:14, Tilman Hausherr <TH...@t-online.de> wrote:
>
>> Hi,
>>
>> Most attachments are deleted here.
>>
>> Alternatives:
>> - upload it somewhere
>> - send it to me
>> - open an issue with JIRA
>>
>> Btw use loadNonSeq(..., null) which cures some problems.
>>
>> Tilman
>>
>> Am 13.06.2014 10:50, schrieb Matt Pryor:
>>
>>> Hello,
>>>
>>> Do you know if there is an issue with PDFImageWriter for searchable PDFs?
>>> I have attached an example PDF, and the following code:
>>>
>>> PDFImageWriter imageWriter = new PDFImageWriter();
>>> PDDocument document = PDDocument.load(new File("c:\\temp\\fax-
>>> 2014-06-11-16_04_47.pdf"));
>>> int numPages = document.getNumberOfPages();
>>> imageWriter.writeImage(document, "jpg", null,
>>> 1, numPages, "c:\\temp\\pdftoimage", BufferedImage.TYPE_BYTE_BINARY,
>>> Toolkit.getDefaultToolkit().getScreenResolution());
>>> document.close();
>>>
>>> Which appears to render a blank image.
>>>
>>> If I use a non-searchable PDF it renders correctly.
>>>
>>> Many thanks in advance for any suggestions.
>>>
>>> --
>>> --
>>> Matt Pryor
>>>
>>> The International Presence Group of Companies
>>> Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
>>> Surrey KT6 5NE
>>>
>>> TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
>>> TEL US: +1 321 726 9941, FAX +1 321 726 6210
>>> EMAIL: pryor@presencebpm.com <ma...@presencebpm.com>
>>>
>>> URL: www.International-presence.com <http://www.International-
>>> presence.com>
>>>
>>>
>>> International Presence Limited: Registered in England and Wales No.3709669
>>>
>>> This E-mail and any attachments transmitted with it are confidential and
>>> intended solely for the use of the individual or entity to whom they are
>>> addressed. If you are not the intended recipient please destroy this
>>> message and kindly notify the sender by reply E-Mail. Opinions, conclusions
>>> and other information in this message that do not relate to the official
>>> business of International Presence Limited do not necessarily reflect the
>>> views of the company.
>>>
>>> International Presence Ltd
>>> Unit 10, Coppergate Mews
>>> Surbiton
>>> Surrey KT6 5NE
>>>
>>
>
Re: PDFImageWriter
Posted by Matt Pryor <pr...@international-presence.com>.
Thanks for the reply, Tilman.
I've uploaded the document to:
http://www.international-presence.com/matt/fax-2014-06-11-16_04_47.pdf
Tried using loadNonSeq method instead and still no joy.
Many thanks
Matt
On 13 June 2014 12:14, Tilman Hausherr <TH...@t-online.de> wrote:
> Hi,
>
> Most attachments are deleted here.
>
> Alternatives:
> - upload it somewhere
> - send it to me
> - open an issue with JIRA
>
> Btw use loadNonSeq(..., null) which cures some problems.
>
> Tilman
>
> Am 13.06.2014 10:50, schrieb Matt Pryor:
>
>> Hello,
>>
>> Do you know if there is an issue with PDFImageWriter for searchable PDFs?
>> I have attached an example PDF, and the following code:
>>
>> PDFImageWriter imageWriter = new PDFImageWriter();
>> PDDocument document = PDDocument.load(new File("c:\\temp\\fax-
>> 2014-06-11-16_04_47.pdf"));
>> int numPages = document.getNumberOfPages();
>> imageWriter.writeImage(document, "jpg", null,
>> 1, numPages, "c:\\temp\\pdftoimage", BufferedImage.TYPE_BYTE_BINARY,
>> Toolkit.getDefaultToolkit().getScreenResolution());
>> document.close();
>>
>> Which appears to render a blank image.
>>
>> If I use a non-searchable PDF it renders correctly.
>>
>> Many thanks in advance for any suggestions.
>>
>> --
>> --
>> Matt Pryor
>>
>> The International Presence Group of Companies
>> Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
>> Surrey KT6 5NE
>>
>> TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
>> TEL US: +1 321 726 9941, FAX +1 321 726 6210
>> EMAIL: pryor@presencebpm.com <ma...@presencebpm.com>
>>
>> URL: www.International-presence.com <http://www.International-
>> presence.com>
>>
>>
>> International Presence Limited: Registered in England and Wales No.3709669
>>
>> This E-mail and any attachments transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they are
>> addressed. If you are not the intended recipient please destroy this
>> message and kindly notify the sender by reply E-Mail. Opinions, conclusions
>> and other information in this message that do not relate to the official
>> business of International Presence Limited do not necessarily reflect the
>> views of the company.
>>
>> International Presence Ltd
>> Unit 10, Coppergate Mews
>> Surbiton
>> Surrey KT6 5NE
>>
>
>
--
--
Matt Pryor
The International Presence Group of Companies
Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road, Surbiton,
Surrey KT6 5NE
TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
TEL US: +1 321 726 9941, FAX +1 321 726 6210
EMAIL: pryor@presencebpm.com
URL: www.International-presence.com
International Presence Limited: Registered in England and Wales No.3709669
This E-mail and any attachments transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient please destroy this
message and kindly notify the sender by reply E-Mail. Opinions, conclusions
and other information in this message that do not relate to the official
business of International Presence Limited do not necessarily reflect the
views of the company.
International Presence Ltd
Unit 10, Coppergate Mews
Surbiton
Surrey KT6 5NE
Re: PDFImageWriter
Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,
Most attachments are deleted here.
Alternatives:
- upload it somewhere
- send it to me
- open an issue with JIRA
Btw use loadNonSeq(..., null) which cures some problems.
Tilman
Am 13.06.2014 10:50, schrieb Matt Pryor:
> Hello,
>
> Do you know if there is an issue with PDFImageWriter for searchable
> PDFs? I have attached an example PDF, and the following code:
>
> PDFImageWriter imageWriter = new PDFImageWriter();
> PDDocument document = PDDocument.load(new
> File("c:\\temp\\fax-2014-06-11-16_04_47.pdf"));
> int numPages = document.getNumberOfPages();
> imageWriter.writeImage(document, "jpg", null,
> 1, numPages, "c:\\temp\\pdftoimage", BufferedImage.TYPE_BYTE_BINARY,
> Toolkit.getDefaultToolkit().getScreenResolution());
> document.close();
>
> Which appears to render a blank image.
>
> If I use a non-searchable PDF it renders correctly.
>
> Many thanks in advance for any suggestions.
>
> --
> --
> Matt Pryor
>
> The International Presence Group of Companies
> Registered Office:10 Coppergate Mews, 109 - 111 Brighton Road,
> Surbiton, Surrey KT6 5NE
>
> TEL UK: +44 (0)845 130 6458, FAX: +44 (0)845 130 6459
> TEL US: +1 321 726 9941, FAX +1 321 726 6210
> EMAIL: pryor@presencebpm.com <ma...@presencebpm.com>
>
> URL: www.International-presence.com
> <http://www.International-presence.com>
>
> International Presence Limited: Registered in England and Wales No.3709669
>
> This E-mail and any attachments transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom
> they are addressed. If you are not the intended recipient please
> destroy this message and kindly notify the sender by reply E-Mail.
> Opinions, conclusions and other information in this message that do
> not relate to the official business of International Presence Limited
> do not necessarily reflect the views of the company.
>
> International Presence Ltd
> Unit 10, Coppergate Mews
> Surbiton
> Surrey KT6 5NE