You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by ma...@bawagpsk.com on 2013/08/14 20:25:16 UTC
Extracting images
Hello!
i tried to extract images (PDFs generated by scanner) in .NET. It works for TIF
but fails for JPGs.
I've also tested it with the compiled ExtractImages.exe and got following error:
Exception in thread "main" java.lang.NullPointerException
at org.apache.pdfbox.util.ImageIOUtil.addResolution
(ImageIOUtil.java:213)
at org.apache.pdfbox.util.ImageIOUtil.createMetadata
(ImageIOUtil.java:204)
at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:158)
at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:114)
at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:97)
at org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.write2OutputStream
(PDJpeg.java:298)
at org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.write2file
(PDXObjectImage.java:224)
at org.apache.pdfbox.ExtractImages.processResources
(ExtractImages.java:202)
at org.apache.pdfbox.ExtractImages.extractImages(ExtractImages.java:160)
at org.apache.pdfbox.ExtractImages.main(ExtractImages.java:66)
br,
Martin
(See attached file: TIF.pdf)(See attached file: JPG.pdf)
Diese Information und eventuelle Anhaenge sind vertraulich
und ausschliesslich zur Kenntnisnahme durch den oder die
genannten Adressaten bestimmt. Sollten Sie nicht der
vorgesehene Adressat sein, ersuchen wir Sie, uns unverzueglich
zu informieren und die Nachricht zu loeschen. Der Inhalt der
fehlgeleiteten Nachricht darf weder aufgezeichnet noch
Unbefugten mitgeteilt oder fuer irgendwelche Zwecke verwertet
werden. Bitte beachten Sie weiters, dass trotz hoechstmoeglicher
Sorgfalt unsererseits aufgrund der technischen Gegebenheiten
im Internet keine Verantwortung fuer die Existenz von Viren
uebernommen werden kann.
This message and any attachments are confidential and are
only intended for the recipient(s) to which they have been
addressed. If you have received this message in error, please
notify the sender immediately and delete the message from
your system. The contents of this misdirected mail may not be
saved, recorded or used for any purpose whatsoever or made
available to unauthorised persons. This message has been
prepared and sent with the greatest possible care, including
scanning for viruses. In spite of this, we assume no liability
whatsoever for the existence of any viruses.
Firma: BAWAG P.S.K. Bank fuer Arbeit und Wirtschaft und Oesterreichische Postsparkasse Aktiengesellschaft
Rechtsform: Aktiengesellschaft
Sitz: politische Gemeinde Wien
Firmenbuchnummer: 205340x
Firmenbuchgericht: Handelsgericht Wien
DVR-Nummer: 1075217
Re: Re: Extracting images
Posted by ma...@bawagpsk.com.
Hi,
I've uploaded them to rapidshare
https://rapidshare.com/#users|47147214|368b132f82f7b2813da2d50a69416b6d|19038|
referer-81F7E8BFFDD96C2F9AFBDAAEA0526716
br,
Martin
Diese Information und eventuelle Anhaenge sind vertraulich
und ausschliesslich zur Kenntnisnahme durch den oder die
genannten Adressaten bestimmt. Sollten Sie nicht der
vorgesehene Adressat sein, ersuchen wir Sie, uns unverzueglich
zu informieren und die Nachricht zu loeschen. Der Inhalt der
fehlgeleiteten Nachricht darf weder aufgezeichnet noch
Unbefugten mitgeteilt oder fuer irgendwelche Zwecke verwertet
werden. Bitte beachten Sie weiters, dass trotz hoechstmoeglicher
Sorgfalt unsererseits aufgrund der technischen Gegebenheiten
im Internet keine Verantwortung fuer die Existenz von Viren
uebernommen werden kann.
This message and any attachments are confidential and are
only intended for the recipient(s) to which they have been
addressed. If you have received this message in error, please
notify the sender immediately and delete the message from
your system. The contents of this misdirected mail may not be
saved, recorded or used for any purpose whatsoever or made
available to unauthorised persons. This message has been
prepared and sent with the greatest possible care, including
scanning for viruses. In spite of this, we assume no liability
whatsoever for the existence of any viruses.
Firma: BAWAG P.S.K. Bank fuer Arbeit und Wirtschaft und Oesterreichische Postsparkasse Aktiengesellschaft
Rechtsform: Aktiengesellschaft
Sitz: politische Gemeinde Wien
Firmenbuchnummer: 205340x
Firmenbuchgericht: Handelsgericht Wien
DVR-Nummer: 1075217
Re: Extracting images
Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,
Am 14.08.2013 20:25, schrieb martin.pleil@bawagpsk.com:
>
> Hello!
>
> i tried to extract images (PDFs generated by scanner) in .NET. It works for TIF
> but fails for JPGs.
Sounds like a .NET related issue. Did you ever try the java version? Which
version of PDFBox are you using?
> I've also tested it with the compiled ExtractImages.exe and got following error:
>
> Exception in thread "main" java.lang.NullPointerException
> at org.apache.pdfbox.util.ImageIOUtil.addResolution
> (ImageIOUtil.java:213)
> at org.apache.pdfbox.util.ImageIOUtil.createMetadata
> (ImageIOUtil.java:204)
> at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:158)
> at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:114)
> at org.apache.pdfbox.util.ImageIOUtil.writeImage(ImageIOUtil.java:97)
> at org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.write2OutputStream
> (PDJpeg.java:298)
> at org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.write2file
> (PDXObjectImage.java:224)
> at org.apache.pdfbox.ExtractImages.processResources
> (ExtractImages.java:202)
> at org.apache.pdfbox.ExtractImages.extractImages(ExtractImages.java:160)
> at org.apache.pdfbox.ExtractImages.main(ExtractImages.java:66)
>
>
> br,
> Martin
>
> (See attached file: TIF.pdf)(See attached file: JPG.pdf)
Your attachments didn't make it due the some restrictions to the mailing list.
Please upload the pdfs to a sharehoster or something similar.
BR
Andreas Lehmkühler