cancel
Showing results for 
Search instead for 
Did you mean: 

4.2.e - Preview not fully fonctionnal

vincent_ravier
Champ in-the-making
Champ in-the-making
Hi,

When trying to display a page about a specific pdf file, the preview cannot be rendered, with a message saying "The preview cannot be loaded from the server". However, previewing a simple pdf (self-generated file, only containing an image) works. The not-previewable pdf file is more complex, it contains a concert ticket with images and text.

So, I took a look at catalina.out, and it pointed out Alfresco cannot connect to OpenOffice server.
After some modifications to have LibreOffice server running (libreoffice script names libreoffice_ctl.sh instead of ctl.sh as refered to in alfresco.sh) and ImageMagick path setup in alfresco-global.properties, I get less errors in catalina.out.
There's still one thing I can't get rid of:
<blockcode>2013-12-26 09:03:44,206  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-10] Exception from executeScript - redirecting to status template error: 11260006 Wrapped Exception (with status template): 11260299 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 11260298 Read-Write transaction started within read-only transaction</blockcode>

One of the only relevant (I think) information I've found so far is: https://issues.alfresco.com/jira/browse/MNT-7303
I'm not familiar with web scripts, I've just found a <b>thumbnail.get.desc.xml</b> containing:
<blockcode><webscript kind="org.alfresco.repository.content.stream">
  <shortname>Thumbnails</shortname>
  <description>
  Get a named thumbnail for a content resource.<br/>
  The two URL templates which support a 'filename' template-arg are made available in order to
  support scenarios (e.g. with third party libraries) where the repo URL being called includes an explicit filename suffix.<br/>
  Please note that Alfresco does not currently use the filename template-arg and that it will be ignored.
  Therefore a GET to these URLs will return the same resource as to the equivalent URLs without it.
  </description>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}&amp;lastModified={modified?}</url>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url> 
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url> 
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
  <transaction allow="readonly">required</transaction>
  <format default="">argument</format>
  <authentication>user</authentication>
  <transaction>required</transaction>
</webscript></blockcode>

I'm just able to notice there's two transaction tags and… that's all. I don't really know what to do next to solve this error, and I don't even know if it will make preview working.
Apparently there's quite a lot of things about the preview, I've read about ImageMagick, JodConverter, LibreOffice, SWFTools… I'm a little bit lost, and understanding the stack involved when generating a preview is quite hard. There's no clear documentation about what is happening when. Also, are thumbnails and transformers somehow related?

Can someone clarify all this?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Please raise in JIRA with a copy of the file that does not work.

Yes thumbnails are an example of a transformation.

vincent_ravier
Champ in-the-making
Champ in-the-making
Unfortunatly, due to confidential and personal information contained in the pdf file, I can't attach it to a bug Smiley Sad
As soon as I have another non-previewable pdf file I can upload, I'll raise a JIRA.

Thanks

hello_wrold
Champ in-the-making
Champ in-the-making
Hi,

I ran into the same problem just yesterday and had a closer look at the pdf itself. Turned out, the pdf had permissions set to disallow 'Document Assembly', 'Content Copying', 'Page Extraction' and some more that would have been required to create a thumbnail.  The usual tools for  pdf handling were also complaining about missing passwords or restrictions.

Maybe it's same with the pdfs you ran into trouble with?

(Alfresco 4.2f here)

HTH,
  -daniel

No rule without exception: I found a pdf that refuses to show a preview in my local alfresco install (4.2f) and the Bitnami supplied Alfresco VM but works w/o quirks on "Alfresco in the cloud". Check   http://www.medconcept.org/veranst/onkointerv140926/anmeldung.pdf if you get a preview rendered.

What kind of magic do I need to get a preview rendered for that PDF?

Thanks,
  -daniel