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