TN and preview in islandora pdf solution pack

49 views
Skip to first unread message

Mehdi Halvaei

unread,
Aug 25, 2014, 7:44:01 AM8/25/14
to isla...@googlegroups.com
hi
when i uplode a pdf file in  Islandora pdf solution pack,the color of datastream (TN,preview) that made with  imagemagick become darker.
for example if thepdf is withe after upolode it become black
or if it is blue it become dark blue.

**app info:
*drupal 7
*image magick Version information:
Version: ImageMagick 6.8.7-8 Q16 x86_64 2013-12-08 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: fontconfig freetype gslib jbig jng jp2 jpeg lcms png ps tiff zlib
ImageMagick was found and returns this version information.
*islandora:1.7.1
test.pdf
view.pdf
view (1).jpg
view.jpg

Mehdi Halvaei

unread,
Aug 26, 2014, 1:03:02 AM8/26/14
to isla...@googlegroups.com
this problem was happend in version(Islandora 6.x- 12.1.0 ) and it solve with this link:

Mehdi Halvaei

unread,
Aug 26, 2014, 2:01:52 AM8/26/14
to isla...@googlegroups.com
but i still saw in drupal 7.

Some body help me!

Serhiy Polyakov

unread,
Aug 26, 2014, 3:20:18 AM8/26/14
to isla...@googlegroups.com
Try this. In pdf_sp.inc add "-alpha deactivate" as in here:

$cmdline = "/usr/local/bin/convert \"$file\"\[0\] -alpha deactivate -colorspace RGB -thumbnail $width" . "x$height \"$file$file_suffix\"";

(two instances)

Serhiy


--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at http://groups.google.com/group/islandora.
For more options, visit https://groups.google.com/d/optout.

Mehdi Halvaei

unread,
Aug 26, 2014, 3:33:48 AM8/26/14
to isla...@googlegroups.com
tanks Serhiy for your response.

i can't find the path of pdf_sp.inc!
would you please tell me more details for finding this file?

Serhiy Polyakov

unread,
Aug 26, 2014, 3:47:45 AM8/26/14
to isla...@googlegroups.com
It can be:

sites/all/modules/islandora_solution_pack_pdf/pdf_sp.inc

Mehdi Halvaei

unread,
Aug 26, 2014, 3:57:39 AM8/26/14
to isla...@googlegroups.com
i have n't this file in this location!

in this path i saw this files and folders:
root folder contains:
islandora_pdf.install
islandora_pdf.module
LICENSE.txt
README.txt
(folder) xml
islandora_pdf_collection_policy.xml
islandora_pdf_content_model.xml
islandora_pdf_ds_composite_model.xml
islandora_pdf_form_mods.xml
(folder) theme
theme.inc
islandora-pdf.tpl.php
(folder) includes
admin.form.inc
derivatives.inc
pdf_upload.form.inc
(folder) images
(folder) css


version info of islandora pdf solution pack:

name = "Islandora PDF"
description = "Islandora Repository PDF Module"
dependencies[] = islandora
dependencies[] = imagemagick
package = Islandora
core = 7.x
version = 7.x-1.1
configure = admin/islandora/pdf
stylesheets[all][] = css/islandora_pdf.theme.css

Serhiy Polyakov

unread,
Aug 26, 2014, 4:06:59 AM8/26/14
to isla...@googlegroups.com
My version of Islandora is older. You should be able to search for "convert" string in all files of your Islandora directory tree.

Mehdi Halvaei

unread,
Sep 15, 2014, 2:07:13 AM9/15/14
to isla...@googlegroups.com
spechial thanks to Serhiy,

finally i can solve the problem with this method:

you must go in this path and do this:
/sites/all/modules/islandora_solution_pack_pdf/includes
in islandora_pdf_create_jpg_derivative function add this:
$args['alpha'] = '-alpha remove ';
and change png to jpg in $command line, like this:
$command = escapeshellarg($source) . ' ' . implode(' ', $args) . ' ' . escapeshellarg("png:$dest");
Reply all
Reply to author
Forward
0 new messages