Digital object representation

320 views
Skip to first unread message

Sarah Romkey

unread,
Mar 16, 2012, 1:06:11 PM3/16/12
to ICA-AtoM Users, jill....@ubc.ca
When uploading a PDF as a digital object, the default representation
seems to be the large "No Reference Representation Available" image.
When I go into Edit Digital Object and click either, or both of, the
boxes to auto-generate a representation reference or thumbnail
reference, I get a blank white screen after clicking save.

Jessica Bushey

unread,
Mar 16, 2012, 3:46:16 PM3/16/12
to ICA-AtoM Users
Hi Sarah,

I tried testing and could not replicate the problem. If you could
answer a couple questions it might help to troubleshoot:
1) How large is the PDF?
2) What browser are you using?
3) Were you linking the digital object or importing multiple digital
objects?
4) Can you successfully view and edit PDFs that you uploaded at an
earlier date?
5) Are you able to successfully link/import JPEGs?

Thanks,
Jessica B

ICA-AtoM Community Manager

Sarah Romkey

unread,
Mar 16, 2012, 7:40:28 PM3/16/12
to ICA-AtoM Users
Hi Jessica,

1. The PDF is 112 KB
2. Firefox version 10.0.2
3. I clicked on Link Digital Object and then uploaded the file. I'm
realizing now that there is probably a distinction between doing this
and importing a digital file?
4. Now that you mention it, no, they're not really working either.
When I click on digital objects to browse them all, they do not render
any kind of representation (just show little boxes instead) and when
you navigate to them in the archival descriptions they do not show or
open. The one that I uploaded today does open when I click on the big
"No Reference Representation Available" box.
5. Just tried a jpg and it worked fine.

Thanks for your help!

Jessica Bushey

unread,
Mar 16, 2012, 8:05:37 PM3/16/12
to ica-ato...@googlegroups.com
Hi Sarah,

Can you download the pdf? Right click on the "no representation" and download the pdf to your desktop?

Another thought I had is: Do you have Ghostscript installed on your computer?
Please see this related link: Issue 2192

- Jessica


Jessica Bushey, MAS
ICA-AtoM Community Manager

Artefactual Systems Inc.






--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-ato...@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ica-atom-users?hl=en.


David Juhasz

unread,
Mar 16, 2012, 8:07:49 PM3/16/12
to ica-ato...@googlegroups.com
Hi Sarah,

The "ghostscript" application is required to create reference copies in
ICA-AtoM:
http://qubit-toolkit.org/wiki/index.php?title=Minimum_requirements#Ghostscript

Do you know if ghostscript is installed on your server?

Regards,
David


--
David Juhasz,
Software Engineer

Artefactual Systems Inc.
www.artefactual.com

David Juhasz

unread,
Mar 16, 2012, 8:09:07 PM3/16/12
to ica-ato...@googlegroups.com
Sorry, I should have said that ghostscript is required to create
reference copies *for PDF files*.

David

On 12-03-16 05:07 PM, David Juhasz wrote:
> Hi Sarah,
>
> The "ghostscript" application is required to create reference copies
> in ICA-AtoM:
> http://qubit-toolkit.org/wiki/index.php?title=Minimum_requirements#Ghostscript
>
>
> Do you know if ghostscript is installed on your server?
>
> Regards,
> David
>

--

Sarah Romkey

unread,
Mar 19, 2012, 2:47:40 PM3/19/12
to ICA-AtoM Users
Hi Jessica,

Yes, I can download the PDF file.

Thank you for pointing out the issue r.e. Ghostscript- turns out it is
not installed on my computer. Can you clarify if it needs to be on my
computer, on the server, or both?

Cheers,

Sarah

On Mar 16, 5:05 pm, Jessica Bushey <jess...@artefactual.com> wrote:
> Hi Sarah,
>
> Can you download the pdf? Right click on the "no representation" and download the pdf to your desktop?
>
> Another thought I had is: Do you have Ghostscript installed on your computer?
> Please see this related link: Issue 2192
>
> - Jessica
>
> Jessica Bushey, MAS
> ICA-AtoM Community Manager
> jess...@artefactual.com
>
> Artefactual Systems Inc.www.artefactual.com

Jesús García Crespo

unread,
Mar 19, 2012, 3:12:33 PM3/19/12
to ica-ato...@googlegroups.com
Hi Sarah,

Ghostscript and ImageMagick are optional dependencies, but they are both required if you want to process PDF files in ICA-AtoM as described here: http://qubit-toolkit.org/wiki/index.php?title=Minimum_requirements

Only in the server side, in the client side you will just need a viewer.

Regards,
--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056

Sarah Romkey

unread,
Mar 19, 2012, 8:17:01 PM3/19/12
to ICA-AtoM Users
Thanks Jesús. This means that I need Ghostscript viewer to create the
PDF representation, but not that users would need it to view the
representation I assume?

Cheers,

Sarah

On Mar 19, 12:12 pm, Jesús García Crespo <je...@artefactual.com>
wrote:

Jesús García Crespo

unread,
Mar 20, 2012, 2:18:57 PM3/20/12
to ica-ato...@googlegroups.com
Sorry, I wasn't clear. You need ImageMagick and Ghostscript to create PDFs in the server. Clients will only need a PDF viewer like Adobe Acrobat Reader, Xpdf, Evince, etc...

Regards,

jill

unread,
Mar 20, 2012, 2:21:40 PM3/20/12
to ICA-AtoM Users
I'm responsible for the server side of the instance of ICA-AtoM that
Sarah is using. I have confirmed that Ghostscript is installed on the
server. Is there some way to test if it is working correctly with ICA-
AtoM?

When you say that on the client side, you just need a viewer, do you
mean any PDF viewer, or does it have to be something specific to
Ghostscript, like GSview. GSview is the only Ghostscript viewer I
found when searching, and it requires that Ghostscript also be
installed.

Is there something Sarah needs as a content creator that end users of
ICA-AtoM will not need to see these digtal object representations?

Best,

Jill

On Mar 19, 5:17 pm, Sarah Romkey <sarah.rom...@ubc.ca> wrote:
> Thanks Jesús. This means that I need Ghostscript viewer to create the
> PDFrepresentation, but not that users would need it to view therepresentationI assume?
>
> Cheers,
>
> Sarah
>
> On Mar 19, 12:12 pm, Jesús García Crespo <je...@artefactual.com>
> wrote:
>
>
>
>
>
>
>
> > Hi Sarah,
>
> > Ghostscript and ImageMagick are optional dependencies, but they are both
> > required if you want to process PDF files in ICA-AtoM as described here:http://qubit-toolkit.org/wiki/index.php?title=Minimum_requirements
>
> > Only in the server side, in the client side you will just need a viewer.
>
> > Regards,
>
> > On Mon, Mar 19, 2012 at 11:47 AM, Sarah Romkey <sarah.rom...@ubc.ca> wrote:
> > > Hi Jessica,
>
> > > Yes, I can download the PDF file.
>
> > > Thank you for pointing out the issue r.e. Ghostscript- turns out it is
> > > not installed on my computer. Can you clarify if it needs to be on my
> > > computer, on the server, or both?
>
> > > Cheers,
>
> > > Sarah
>
> > > On Mar 16, 5:05 pm, Jessica Bushey <jess...@artefactual.com> wrote:
> > > > Hi Sarah,
>
> > > > Can you download the pdf? Right click on the "norepresentation" and
> > > download the pdf to your desktop?
>
> > > > Another thought I had is: Do you have Ghostscript installed on your
> > > computer?
> > > > Please see this related link: Issue 2192
>
> > > > - Jessica
>
> > > > Jessica Bushey, MAS
> > > > ICA-AtoM Community Manager
> > > > jess...@artefactual.com
>
> > > > Artefactual Systems Inc.www.artefactual.com
>
> > > > On 2012-03-16, at 4:40 PM, Sarah Romkey wrote:
>
> > > > > Hi Jessica,
>
> > > > > 1. The PDF is 112 KB
> > > > > 2. Firefox version 10.0.2
> > > > > 3. I clicked on LinkDigitalObjectand then uploaded the file. I'm
> > > > > realizing now that there is probably a distinction between doing this
> > > > > and importing adigitalfile?
> > > > > 4. Now that you mention it, no, they're not really working either.
> > > > > When I click ondigitalobjects to browse them all, they do not render
> > > > > any kind ofrepresentation(just show little boxes instead) and when
> > > > > you navigate to them in the archival descriptions they do not show or
> > > > > open. The one that I uploaded today does open when I click on the big
> > > > > "No ReferenceRepresentationAvailable" box.
> > > > > 5. Just tried a jpg and it worked fine.
>
> > > > > Thanks for your help!
>
> > > > > On Mar 16, 12:46 pm, Jessica Bushey <jess...@artefactual.com> wrote:
> > > > >> Hi Sarah,
>
> > > > >> I tried testing and could not replicate the problem. If you could
> > > > >> answer a couple questions it might help to troubleshoot:
> > > > >> 1) How large is the PDF?
> > > > >> 2) What browser are you using?
> > > > >> 3) Were you linking thedigitalobjector importing multipledigital
> > > > >> objects?
> > > > >> 4) Can you successfully view and edit PDFs that you uploaded at an
> > > > >> earlier date?
> > > > >> 5) Are you able to successfully link/import JPEGs?
>
> > > > >> Thanks,
> > > > >> Jessica B
>
> > > > >> ICA-AtoM Community Manager
>
> > > > >> On Mar 16, 10:06 am, Sarah Romkey <sarah.rom...@ubc.ca> wrote:
>
> > > > >>> When uploading a PDF as adigitalobject, the defaultrepresentation
> > > > >>> seems to be the large "No ReferenceRepresentationAvailable" image.
> > > > >>> When I go into EditDigitalObjectand click either, or both of, the
> > > > >>> boxes to auto-generate arepresentationreference or thumbnail

Jesús García Crespo

unread,
Mar 20, 2012, 2:32:18 PM3/20/12
to ica-ato...@googlegroups.com
Hi Jill,

On Tue, Mar 20, 2012 at 11:21 AM, jill <jillden...@gmail.com> wrote:
I'm responsible for the server side of the instance of ICA-AtoM that
Sarah is using.  I have confirmed that Ghostscript is installed on the
server.  Is there some way to test if it is working correctly with ICA-
AtoM?

Are you using Windows or Linux? From ICA-AtoM we run a command called "convert" from the ImageMagick suite. With this tool, we build these PDF representations but Ghostscript is internally used by ImageMagick to provide that feature. So you have to check that both tools are available in your system and that ImageMagick was compiled to support Ghostscript. For example, in Ubuntu this is the default behaviour.
 
When you say that on the client side, you just need a viewer, do you
mean any PDF viewer, or does it have to be something specific to
Ghostscript, like GSview.  GSview is the only Ghostscript viewer I
found when searching, and it requires that Ghostscript also be
installed.

Any PDF reader will work. For example, Google Chrome includes now a built-in PDF viewer.
 
Is there something Sarah needs as a content creator that end users of
ICA-AtoM will not need to see these digtal object representations?

No, to see these representations a PDF viewer will be enough for everyone.
 
Let me know how it goes.

jill

unread,
Mar 20, 2012, 4:01:30 PM3/20/12
to ICA-AtoM Users
Our ICA-AtoM server is running on RHEL 5.6. Can you give me an
example convert command you'd use to test this? I'm looking at the
documentation (http://www.imagemagick.com/www/convert.html), but it
would help if you could give me an example to help me get which parts
are relevant.

Best.

On Mar 20, 11:32 am, Jesús García Crespo <je...@artefactual.com>
wrote:
> Hi Jill,

jill

unread,
Mar 20, 2012, 5:07:56 PM3/20/12
to ICA-AtoM Users
I'm quite certain the problem here is on the server side, not the
client. Here is the HTML for viewing a digital object:

[**** in place of text not to make public]

<a href="http://****/uploads/r/****/9/9/996/Robinson_Spider.pdf"
title=""><img src="/images/generic-icons/no_reference_rep.png"></a>

It seems that either the representation image of the PDF is not being
generated, or it's not being associated with the record. Since Sarah
is getting a blank screen when trying to generate the image, I'm
assuming there's something going wrong in that part of the process.

Here are some lines from our error log that should help:

[Fri Mar 16 10:02:23 2012] [error] [client ****] Empty module and/or
action after parsing the URL "/uploads/r/null/2/5/25662/
rbsc_arc_1212_1_1_001_141.jpg" (/)., referer: http://****/index.php/TZFzs;rad
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
identify: Postscript delegate failed `/****/icaatom-1.2.0/uploads/r/
****/9/9/996/Robinson_Spider.pdf'.
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
identify: Postscript delegate failed `/****/icaatom-1.2.0/uploads/r/
****/9/9/996/Robinson_Spider.pdf'.
[Fri Mar 16 10:29:24 2012] [error] [client ****] PHP Fatal error:
Call to a member function processForm() on a non-object in /****/
icaatom-1.2.0/apps/qubit/modules/digitalobject/actions/
editAction.class.php on line 185, referer:
http://****/index.php/robinson-spider-pdf;digitalobject/edit

I'm doing some searching regarding this error, but am going to go
ahead and send this in case anyone has advice on how to resolve.

Best,

Jill

jill

unread,
Mar 20, 2012, 7:13:41 PM3/20/12
to ICA-AtoM Users
I can run the convert command directly with no problems, for example:

# convert 'Robinson_Spider.pdf[0]' -scale 298x198 Robinson_Spider0.png

creates png that is a small version of the 1st page of the pdf.

I was also able to convert the first page of the pdf to a png by
calling Ghostscript directly:

# gs -sDEVICE=pngalpha -sOutputFile=Robinson_Spider_0.png -
dFirstPage=1 -dLastPage=1 -dPDFFitPage Robinson_Spider.pdf

The PDF in this case (the same one in the error log) is 93 pages, and
3.6 MB. Is it possible that the size could be an issue?

Is there any way to give me the equivalent of the command(s) ICA-AtoM
is using when creating the digital object representation?

Best,

Jill

Jesús García Crespo

unread,
Mar 20, 2012, 9:22:10 PM3/20/12
to ica-ato...@googlegroups.com
Hi Jill,

Yes, it is definitely is a problem in the server. If you get a blank screen please try to repeat the same action using the debug mode, that should give you some more details.

The arguments passed to convert are built dynamically in sfImageMagickAdapter::save(), I looked at the code and found that it should be something like:

$ convert -thumbnail WIDTHxHEIGHT -quality 75% inputfile outputfile

I suspect that ImageMagick/Ghostscript has a problem interpreting the PDF file that you are uploading. For example, if you upload a corrupted PDF or a document using fonts that are not available it could fail. I saw that before. Is the problem happening with every PDF file that you try to upload or just some of them?

Let me know how it goes. Good luck!

Regards,

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-ato...@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ica-atom-users?hl=en.

David Juhasz

unread,
Mar 21, 2012, 1:35:40 PM3/21/12
to ica-ato...@googlegroups.com
Hi Jill,

It looks to me like it's the "identify" command is failing in your
case. We use "identify" specifically for multi-page files (like PDFs)
to get a page count. You can test with a simple:

identify <filename>

I found a few issue reports that could be related, one is for Redhat,
and you have to register to read it:
https://access.redhat.com/knowledge/solutions/72303

I actually found the above post as a link from this post for CentOS though:
http://centos.org/modules/newbb/print.php?form=1&topic_id=36328&forum=37&order=ASC&start=0

Maybe those are helpful?

Regards,
David

jill

unread,
Mar 21, 2012, 3:19:04 PM3/21/12
to ICA-AtoM Users, Sarah Romkey
Thank you for the links. I checked, and our server is still running
ImageMagick 6.2.8.0-4el5_5.3, which is what they recommend downgrading
to if this problem is encountered.

I ran the identify command on one of the pdfs for which no
representation image is shown, and it ran just fine (no errors). The
output was like this, for each page, 0-93:

Robinson_Spider.pdf[93] PDF 612x792 612x792+0+0 PseudoClass 2c 7.5mb

I also ran the convert command that Jesús sent:

$ convert -thumbnail 298x198 -quality 75% Robinson_Spider.pdf
Robinson_Spider_thumb.png

and got no errors. It generated a thumbnail for each page of the pdf.

I'll talk to Sarah about the history of this error, and if we could
switch to debug mode temporarily.

Best,

Jill

On Mar 21, 10:35 am, David Juhasz <da...@artefactual.com> wrote:
> Hi Jill,
>
> It looks to me like it's the "identify" command is failing in your
> case.  We use "identify" specifically for multi-page files (like PDFs)
> to get a page count.  You can test with a simple:
>
> identify <filename>
>
> I found a few issue reports that could be related, one is for Redhat,
> and you have to register to read it:https://access.redhat.com/knowledge/solutions/72303
>
> I actually found the above post as a link from this post for CentOS though:http://centos.org/modules/newbb/print.php?form=1&topic_id=36328&forum...

jill

unread,
Mar 23, 2012, 3:46:47 PM3/23/12
to ICA-AtoM Users
I have a little more information that I hope will help us find what's
going wrong.

When a pdf file is uploaded, there are no errors thrown, and no blank
pages, but there is no digital representation or thumbnail created.
When you edit the archive (digitalobject/edit), and check the box for
"Or auto-generate a new representation from master image" for both the
representation and thumbnail, and then click "Save", that is when you
end up on a blank screen. I'm still having trouble with debug mode
(will add more about that below), but I am able to see the following
fatal error after clicking "Save":

"Fatal error: Call to a member function processForm() on a non-object
in /****/icaatom-1.2.0/apps/qubit/modules/digitalobject/actions/
editAction.class.php on line 185"

This is the block of code in that file that includes line 185:

// Process reference/thumbnail rights components
foreach ($this->representations as $usageId => $representation)
{
$this["rightEditComponent_$usageId"]->processForm();
$representation->save();
}



Issue with debug mode:

I'm trying to just view the page using browser on the server (via
quit_dev.php), and I get a huge chain of warnings that begin with:

Warning: fopen(/****/icaatom-1.2.0/log/qubit_dev.log)
[function.fopen]: failed to open stream: Permission denied in /****/
icaatom-1.2.0/vendor/symfony/lib/log/sfFileLogger.class.php on line 78

I've verified that the owner and group for the log directory and the
qubit_dev.log file are the web server user, and I tried setting
permissions to 777 for the directory and the file, but still get this
warning, and the many that follow. The warnings that follow are
variations of:

"Warning: flock() expects parameter 1 to be resource, boolean given
in /****/icaatom-1.2.0/vendor/symfony/lib/log/sfFileLogger.class.php
on line 95

Warning: fwrite() expects parameter 1 to be resource, boolean given
in /****/icaatom-1.2.0/vendor/symfony/lib/log/sfFileLogger.class.php
on line 102"

On most page, I still get the debug menu at the top (with config,
view, logs, etc,), but after clicking save on the digitalobject/edit,
the menu isn't there. I just get the long list of warnings and then
the fatal error I included above.


As for the history of this error with our instance of ICA-AtoM, we
have no reports of this having been a problem in the past (before the
upgrade anyway), and we remember seeing at least thumbnail images for
pdfs, though we don't know exactly when they disappeared. There are
no longer thumbnails displayed for pdfs that were uploaded in the past
(the ones that were there at some point).

Can you tell me where the thumbnails and representation images would
be stored so I can look for them? Is there something I could look for
in the database also that would relate to this?

Thank you, and best,

Jill

jill

unread,
Mar 23, 2012, 4:48:05 PM3/23/12
to ICA-AtoM Users
I've located some thumbnail and digital object representation images
for PDF files in our icaatom-1.1 uploads directory. None of those
have made it into the uploads directory of our icaatom-1.2.0
application. I must have missed that step in the upgrade process.
That is something I can correct, but it does not explain why newly
uploaded files aren't getting images generated.

There are many pdf and jpg files in the uploads/tmp directory. I
don't know if the application is supposed to delete them after moving
them to their final location.

I noticed that in icaatom-1.1 our uploads directory had permissions
set to owner and group writable, and in icaatom-1.2.0, it was set to
only owner writable (owned by the web server user), so I changed that
to group writable as well. I tested again editing the digital object
to generate images, but still get a blank page (and the same error on
debug mode).

jill

unread,
Mar 23, 2012, 4:56:20 PM3/23/12
to ICA-AtoM Users
Sorry to keep writing so much, but I've hit another snag.

Now that I've copied over our uploads subdirectories from icaatom-1.1
and updated the permissions on the 1.2.0 uploads directories, I'm
getting a 500 error when searching:

500 | Internal Server Error | Zend_Search_Lucene_Exception
Field name "do_thumbnail_FullPath" not found in document.
stack trace

* at ()
in SF_ROOT_DIR/plugins/sfLucenePlugin/lib/vendor/Zend/Search/
Lucene/Document.php line 104 ...
101. {
102. if (!array_key_exists($fieldName, $this-
>_fields)) {
103. require_once 'Zend/Search/Lucene/
Exception.php';
104. throw new
Zend_Search_Lucene_Exception("Field name \"$fieldName\" not found in
document.");
105. }
106. return $this->_fields[$fieldName];
107. }

Do I need to reindex to get the newly copied uploads files into the
search index to resolve this?

David Juhasz

unread,
Mar 26, 2012, 7:10:30 PM3/26/12
to ica-ato...@googlegroups.com
Hi Jill,

Ghostscript is definitely failing when trying to identify the Robinson_Spider.pdf:


GPL Ghostscript 8.70: Unrecoverable error, exit code 1
identify: Postscript delegate failed `/****/icaatom-1.2.0/uploads/r/
****/9/9/996/Robinson_Spider.pdf'.

It sounds like this is not occurring when you run identify manually.  My only guesses here are:

1) There's something wrong with the paths that ICA-AtoM is generating. Are the asterisks in the output above from sensitive path information that you have redacted, or is it the actual error log output?  It's possible that it's some form of path shortening from the Ghostscript error output, but it looks weird to me.

2) PHP is running a different version of Ghostscript then you are.  This could happen if there are multiple ghostscript binaries on the server.  You could try running simple php script file that just runs the convert command on the shell (via http://www.php.net/manual/en/function.shell-exec.php or similar).


Regards,
David
Reply all
Reply to author
Forward
0 new messages