Difference between revisions of "SUNScholar/Media Filters/4.X"

From Libopedia
Jump to navigation Jump to search
Line 11: Line 11:
  
 
==Step 3 - Configuration==
 
==Step 3 - Configuration==
 +
===Step 3A===
 
First, be sure there is a value for thumbnail.maxwidth and that it corresponds to the size you want for preview images for the UI.
 
First, be sure there is a value for thumbnail.maxwidth and that it corresponds to the size you want for preview images for the UI.
  
Line 21: Line 22:
 
         thumbnail.maxheight = 80
 
         thumbnail.maxheight = 80
 
</pre>
 
</pre>
 +
===Step 3B===
 
Now, add the absolute paths to the XPDF tools you installed.
 
Now, add the absolute paths to the XPDF tools you installed.
  
Line 29: Line 31:
 
xpdf.path.pdfinfo  = /usr/bin/pdfinfo
 
xpdf.path.pdfinfo  = /usr/bin/pdfinfo
 
</pre>
 
</pre>
 +
===Step 3C===
 
Change the MediaFilter plugin configuration to remove the old ''"org.dspace.app.mediafilter.PDFFilter"'' and add the new filters ''"org.dspace.app.mediafilter.XPDF2Text = PDF Text Extractor"'' and ''"org.dspace.app.mediafilter.XPDF2Thumbnail = PDF Thumbnail"''.
 
Change the MediaFilter plugin configuration to remove the old ''"org.dspace.app.mediafilter.PDFFilter"'' and add the new filters ''"org.dspace.app.mediafilter.XPDF2Text = PDF Text Extractor"'' and ''"org.dspace.app.mediafilter.XPDF2Thumbnail = PDF Thumbnail"''.
  
Line 47: Line 50:
 
         org.dspace.app.mediafilter.BrandedPreviewJPEGFilter = Branded Preview JPEG
 
         org.dspace.app.mediafilter.BrandedPreviewJPEGFilter = Branded Preview JPEG
 
</pre>
 
</pre>
 +
===Step 3D===
 
Then add the input format configuration properties for each of the new filters.
 
Then add the input format configuration properties for each of the new filters.
  

Revision as of 21:54, 21 December 2014

Back to Media Filters

Step 1 - Login to the server

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01

Step 2 - Install the Ubuntu software packages

Type the following:

sudo apt-get install xpdf poppler-utils jai-core jai-imageio-core

Step 3 - Configuration

Step 3A

First, be sure there is a value for thumbnail.maxwidth and that it corresponds to the size you want for preview images for the UI.

Edit the "dspace.cfg" file.

nano /home/dspace/source/config/dspace.cfg

Search for the following and modify.

# maximum width and height of generated thumbnails
        thumbnail.maxwidth= 80
        thumbnail.maxheight = 80

Step 3B

Now, add the absolute paths to the XPDF tools you installed.

See example below.

xpdf.path.pdftotext = /usr/bin/pdftotext
xpdf.path.pdftoppm  = /usr/bin/pdftoppm
xpdf.path.pdfinfo   = /usr/bin/pdfinfo

Step 3C

Change the MediaFilter plugin configuration to remove the old "org.dspace.app.mediafilter.PDFFilter" and add the new filters "org.dspace.app.mediafilter.XPDF2Text = PDF Text Extractor" and "org.dspace.app.mediafilter.XPDF2Thumbnail = PDF Thumbnail".

See example below.

filter.plugins = \
        PDF Text Extractor, \
        PDF Thumbnail, \
        HTML Text Extractor, \
        Word Text Extractor, \
        JPEG Thumbnail
         plugin.named.org.dspace.app.mediafilter.FormatFilter = \
        org.dspace.app.mediafilter.XPDF2Text = PDF Text Extractor, \
        org.dspace.app.mediafilter.XPDF2Thumbnail = PDF Thumbnail, \
        org.dspace.app.mediafilter.HTMLFilter = HTML Text Extractor, \
        org.dspace.app.mediafilter.WordFilter = Word Text Extractor, \
        org.dspace.app.mediafilter.JPEGFilter = JPEG Thumbnail, \
        org.dspace.app.mediafilter.BrandedPreviewJPEGFilter = Branded Preview JPEG

Step 3D

Then add the input format configuration properties for each of the new filters.

See example below.

filter.org.dspace.app.mediafilter.XPDF2Thumbnail.inputFormats = Adobe PDF
filter.org.dspace.app.mediafilter.XPDF2Text.inputFormats = Adobe PDF

References