XPDF Thumbnail Creation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XPDF Thumbnail Creation

RENTON Scott
Hi folks

I'm trying to generate PDF thumbnails for a repository, and I have followed the instructions at https://wiki.duraspace.org/display/DSDOC18/Configuration#Configuration-XPDFFilter

I've built on a Mac, incorporating the java advanced imaging jars, and uploaded, including the XPDF tools to a Linux box. The error I get from media-filter is as follows:

ERROR filtering, skipping bitstream:

Item Handle: 123456789/8545
Bundle Name: ORIGINAL
File Size: 13249898
Checksum: b0152697cf45c5a396a5f85f21df1979 (MD5)
Asset Store: 0
java.io.IOException: Unknown failure while transforming file to preview: no image produced.
java.io.IOException: Unknown failure while transforming file to preview: no image produced.
at org.dspace.app.mediafilter.XPDF2Thumbnail.getDestinationStream(XPDF2Thumbnail.java:274)
at org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilterManager.java:737)
at org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilterManager.java:561)
at org.dspace.app.mediafilter.MediaFilterManager.filterItem(MediaFilterManager.java:511)
at org.dspace.app.mediafilter.MediaFilterManager.applyFiltersItem(MediaFilterManager.java:479)
at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.java:353)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
Updating search index:

It looks as though, in XPDF2Thumbnail.java, I am ok up to the call to

source = ImageIO.read(outf);

as the previous logs say

2013-07-23 16:28:13,932 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ DPI: pdfinfo method got dpi=72 for max dim=792 (points, 1/72")
2013-07-23 16:28:13,933 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ Running xpdf command: [/u01/dspace/dspace/bin/xpdf/pdftoppm, -q, -f, 1, -l, 1, -r, 72, /tmp/DSfilt7452068847272888953.pdf, /tmp/prevu8069855567105058459out]
2013-07-23 16:28:14,065 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ PDFTOPPM output is: /tmp/prevu8069855567105058459out-000001.ppm, exists=true

Source is null coming out of ImageIO. Just wondering if anyone knows enough about the class to give me any pointers as to why the transform should fail.

Thanks very much- I can give more information if it will help!
Scott



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Reply | Threaded
Open this post in threaded view
|

Re: XPDF Thumbnail Creation

Àlex Magaz Graça
El dia dc 24 jul 2013 10:55:41 CEST, RENTON Scott va escriure:

> Hi folks
>
> I'm trying to generate PDF thumbnails for a repository, and I have followed the instructions at https://wiki.duraspace.org/display/DSDOC18/Configuration#Configuration-XPDFFilter
>
> I've built on a Mac, incorporating the java advanced imaging jars, and uploaded, including the XPDF tools to a Linux box. The error I get from media-filter is as follows:
>
> ERROR filtering, skipping bitstream:
>
> Item Handle: 123456789/8545
> Bundle Name: ORIGINAL
> File Size: 13249898
> Checksum: b0152697cf45c5a396a5f85f21df1979 (MD5)
> Asset Store: 0
> java.io.IOException: Unknown failure while transforming file to preview: no image produced.
> java.io.IOException: Unknown failure while transforming file to preview: no image produced.
> at org.dspace.app.mediafilter.XPDF2Thumbnail.getDestinationStream(XPDF2Thumbnail.java:274)
> at org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilterManager.java:737)
> at org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilterManager.java:561)
> at org.dspace.app.mediafilter.MediaFilterManager.filterItem(MediaFilterManager.java:511)
> at org.dspace.app.mediafilter.MediaFilterManager.applyFiltersItem(MediaFilterManager.java:479)
> at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.java:353)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
> Updating search index:
>
> It looks as though, in XPDF2Thumbnail.java, I am ok up to the call to
>
> source = ImageIO.read(outf);
>
> as the previous logs say
>
> 2013-07-23 16:28:13,932 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ DPI: pdfinfo method got dpi=72 for max dim=792 (points, 1/72")
> 2013-07-23 16:28:13,933 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ Running xpdf command: [/u01/dspace/dspace/bin/xpdf/pdftoppm, -q, -f, 1, -l, 1, -r, 72, /tmp/DSfilt7452068847272888953.pdf, /tmp/prevu8069855567105058459out]
> 2013-07-23 16:28:14,065 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail @ PDFTOPPM output is: /tmp/prevu8069855567105058459out-000001.ppm, exists=true
>
> Source is null coming out of ImageIO. Just wondering if anyone knows enough about the class to give me any pointers as to why the transform should fail.
>
> Thanks very much- I can give more information if it will help!
> Scott
>
>
>

Hi Scott,

I had the same problem some days ago. It happened because I forgot the
-Pxpdf-mediafilter-support when running Maven. As a consequence the
ImageIO JARs weren't included and the read() call returned null. Check
for the following JARs in [dspace]/lib/ in case they are missing for
some reason:

jai_core-1.1.2_01.jar
jai_imageio-1.0_01.jar

Cheers,
Àlex

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Reply | Threaded
Open this post in threaded view
|

Re: XPDF Thumbnail Creation

RENTON Scott
Hi Alex

That worked perfectly-thank you very much indeed for your help, I'm really
grateful!

Cheers
Scott

On 24/07/2013 10:57, "Àlex Magaz Graça" <[hidden email]> wrote:

>El dia dc 24 jul 2013 10:55:41 CEST, RENTON Scott va escriure:
>> Hi folks
>>
>> I'm trying to generate PDF thumbnails for a repository, and I have
>>followed the instructions at
>>https://wiki.duraspace.org/display/DSDOC18/Configuration#Configuration-XP
>>DFFilter
>>
>> I've built on a Mac, incorporating the java advanced imaging jars, and
>>uploaded, including the XPDF tools to a Linux box. The error I get from
>>media-filter is as follows:
>>
>> ERROR filtering, skipping bitstream:
>>
>> Item Handle: 123456789/8545
>> Bundle Name: ORIGINAL
>> File Size: 13249898
>> Checksum: b0152697cf45c5a396a5f85f21df1979 (MD5)
>> Asset Store: 0
>> java.io.IOException: Unknown failure while transforming file to
>>preview: no image produced.
>> java.io.IOException: Unknown failure while transforming file to
>>preview: no image produced.
>> at
>>org.dspace.app.mediafilter.XPDF2Thumbnail.getDestinationStream(XPDF2Thumb
>>nail.java:274)
>> at
>>org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilte
>>rManager.java:737)
>> at
>>org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilter
>>Manager.java:561)
>> at
>>org.dspace.app.mediafilter.MediaFilterManager.filterItem(MediaFilterManag
>>er.java:511)
>> at
>>org.dspace.app.mediafilter.MediaFilterManager.applyFiltersItem(MediaFilte
>>rManager.java:479)
>> at
>>org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.jav
>>a:353)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>>:39)
>> at
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>>mpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
>> Updating search index:
>>
>> It looks as though, in XPDF2Thumbnail.java, I am ok up to the call to
>>
>> source = ImageIO.read(outf);
>>
>> as the previous logs say
>>
>> 2013-07-23 16:28:13,932 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail
>>@ DPI: pdfinfo method got dpi=72 for max dim=792 (points, 1/72")
>> 2013-07-23 16:28:13,933 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail
>>@ Running xpdf command: [/u01/dspace/dspace/bin/xpdf/pdftoppm, -q, -f,
>>1, -l, 1, -r, 72, /tmp/DSfilt7452068847272888953.pdf,
>>/tmp/prevu8069855567105058459out]
>> 2013-07-23 16:28:14,065 DEBUG org.dspace.app.mediafilter.XPDF2Thumbnail
>>@ PDFTOPPM output is: /tmp/prevu8069855567105058459out-000001.ppm,
>>exists=true
>>
>> Source is null coming out of ImageIO. Just wondering if anyone knows
>>enough about the class to give me any pointers as to why the transform
>>should fail.
>>
>> Thanks very much- I can give more information if it will help!
>> Scott
>>
>>
>>
>
>Hi Scott,
>
>I had the same problem some days ago. It happened because I forgot the
>-Pxpdf-mediafilter-support when running Maven. As a consequence the
>ImageIO JARs weren't included and the read() call returned null. Check
>for the following JARs in [dspace]/lib/ in case they are missing for
>some reason:
>
>jai_core-1.1.2_01.jar
>jai_imageio-1.0_01.jar
>
>Cheers,
>Àlex


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette