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

From Libopedia
Jump to navigation Jump to search
Line 16: Line 16:
 
==Step 3 - Install the java packages==
 
==Step 3 - Install the java packages==
  
==Step 3 - Configuration==
+
==Step 4 - Configuration==
===Step 3A===
+
===Step 4A===
 
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 29: Line 29:
 
</pre>
 
</pre>
  
===Step 3B===
+
===Step 4B===
 
Now, add the absolute paths to the XPDF tools you installed.
 
Now, add the absolute paths to the XPDF tools you installed.
  
Line 38: Line 38:
 
xpdf.path.pdfinfo  = /usr/bin/pdfinfo
 
xpdf.path.pdfinfo  = /usr/bin/pdfinfo
 
</pre>
 
</pre>
===Step 3C===
+
===Step 4C===
 
Add the filter plugins.
 
Add the filter plugins.
 
<pre>
 
<pre>
Line 50: Line 50:
 
</pre>
 
</pre>
  
===Step 3D===
+
===Step 4D===
 
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 63: Line 63:
 
</pre>
 
</pre>
  
===Step 3E===
+
===Step 4E===
 
Then replace ''"filter.org.dspace.app.mediafilter.PDFFilter.inputFormats = Adobe PDF"'' with the following:
 
Then replace ''"filter.org.dspace.app.mediafilter.PDFFilter.inputFormats = Adobe PDF"'' with the following:
 
<pre>
 
<pre>
Line 69: Line 69:
 
filter.org.dspace.app.mediafilter.XPDF2Text.inputFormats = Adobe PDF
 
filter.org.dspace.app.mediafilter.XPDF2Text.inputFormats = Adobe PDF
 
</pre>
 
</pre>
 +
 
==Step 4 - Build and Install==
 
==Step 4 - Build and Install==
 
Perform the following as the "dspace" user.
 
Perform the following as the "dspace" user.

Revision as of 10:27, 22 December 2014

Back to Media Filters

Requirements

Please note: This is an untested procedure. It is a work in progress.

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03#Step_3.2

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 libjai-core-java libjai-imageio-core-java

Step 3 - Install the java packages

Step 4 - Configuration

Step 4A

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 4B

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 4C

Add the filter plugins.

filter.plugins = \
        PDF Text Extractor, \
        PDF Thumbnail, \
        HTML Text Extractor, \
        Word Text Extractor, \
        JPEG Thumbnail, \
        Branded Preview JPEG

Step 4D

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".

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 4E

Then replace "filter.org.dspace.app.mediafilter.PDFFilter.inputFormats = Adobe PDF" with the following:

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

Step 4 - Build and Install

Perform the following as the "dspace" user.

To build, type the following:

cd /home/dspace/source
mvn -Pxpdf-mediafilter-support package

To install, type the following: (Replace XXX with your DSpace version number)

cd /home/dspace/source/dspace/target/dspace-XXX-build
ant update
ant clean_backups

References