<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Grasping Thumbnails in Alfresco 3</title>
	<atom:link href="http://ecmarchitect.com/archives/2009/03/03/913/feed" rel="self" type="application/rss+xml" />
	<link>http://ecmarchitect.com/archives/2009/03/03/913</link>
	<description>Jeff Potts on ECM, portals, search, collaboration, and a bunch of personal stuff</description>
	<lastBuildDate>Mon, 06 Sep 2010 22:32:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Yugoo</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-47634</link>
		<dc:creator>Yugoo</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:45:21 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-47634</guid>
		<description>for those who looking for a way to generate PSD thumbnail :
1) write a custom mimetype-map (see above)
2) a custom mimetype application/photoshop (see above or google it)
3) a custom content-transformer using the imagemagick &quot;convert&quot; binary.
a working example : http://pastie.org/820985.txt 
i&#039;m using imagemagick 6.5.8.3</description>
		<content:encoded><![CDATA[<p>for those who looking for a way to generate PSD thumbnail :<br />
1) write a custom mimetype-map (see above)<br />
2) a custom mimetype application/photoshop (see above or google it)<br />
3) a custom content-transformer using the imagemagick &#8220;convert&#8221; binary.<br />
a working example : <a href="http://pastie.org/820985.txt" rel="nofollow">http://pastie.org/820985.txt</a><br />
i&#8217;m using imagemagick 6.5.8.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hoaivan</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-46411</link>
		<dc:creator>hoaivan</dc:creator>
		<pubDate>Thu, 31 Dec 2009 05:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-46411</guid>
		<description>tested on Alfresco 3.2r2, the thumbnail request should include &quot;qc=queue&quot; instead of &quot;c=queue&quot;</description>
		<content:encoded><![CDATA[<p>tested on Alfresco 3.2r2, the thumbnail request should include &#8220;qc=queue&#8221; instead of &#8220;c=queue&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-36205</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Wed, 03 Jun 2009 15:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-36205</guid>
		<description>Kamlesh,

Glad you got it working!

Jeff</description>
		<content:encoded><![CDATA[<p>Kamlesh,</p>
<p>Glad you got it working!</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-36203</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Wed, 03 Jun 2009 15:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-36203</guid>
		<description>Hi Jeff,

I apologize for the above mentioned statement. Alfresco share do generate thumbnails for PDF files, there might be some issue with my local installation. 

Also, in the example I was trying I noticed that whenever I tried to upload a PDF file the content type of the file was application/binary in place of application/pdf. So I have changed the helloworldform.post.js script to get an existing file from Alfresco’s space. I have called createThumbnail method on this file and saved the file. I have used scImageThumbnail bean as an argument to the createThumbnail method rather than scPdfThumbnail. This has worked and I am able to generate the thumbnail of a PDF file as well as a MS-Word and MS power point files. 

- Kamlesh</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>I apologize for the above mentioned statement. Alfresco share do generate thumbnails for PDF files, there might be some issue with my local installation. </p>
<p>Also, in the example I was trying I noticed that whenever I tried to upload a PDF file the content type of the file was application/binary in place of application/pdf. So I have changed the helloworldform.post.js script to get an existing file from Alfresco’s space. I have called createThumbnail method on this file and saved the file. I have used scImageThumbnail bean as an argument to the createThumbnail method rather than scPdfThumbnail. This has worked and I am able to generate the thumbnail of a PDF file as well as a MS-Word and MS power point files. </p>
<p>- Kamlesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-36154</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Tue, 02 Jun 2009 17:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-36154</guid>
		<description>Hi Jeff,

I have also thought in the same direction and checked whether share is generating thumbnails for PDF files or not. So in my local installation of Alfresco share when I upload a PDF file, it is not showing the thumbnail of the PDF and neither for the microsoft word documents. However thumbnails are generated for images as expected and text files in addition. I am debugging more into Alfresco Share to get some pointer.

- Kamlesh</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>I have also thought in the same direction and checked whether share is generating thumbnails for PDF files or not. So in my local installation of Alfresco share when I upload a PDF file, it is not showing the thumbnail of the PDF and neither for the microsoft word documents. However thumbnails are generated for images as expected and text files in addition. I am debugging more into Alfresco Share to get some pointer.</p>
<p>- Kamlesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-36146</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Tue, 02 Jun 2009 13:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-36146</guid>
		<description>I haven&#039;t tried PDF. My first thought was to verify that ImageMagick can convert PDF to a graphic format. It turns out it can.

So my next thought is maybe the thumbnail classes assume &quot;graphic in, graphic out&quot; and aren&#039;t passing ImageMagick the options necessary to handle PDF. You&#039;ll need to step through that code with a debugger to find out.

Another idea is to look at Share. I know it uses pdf2swf to convert PDF into a pageable SWF file which opens up when you &quot;preview&quot; a document. But it also generates a thumbnail. I grep&#039;d the OOTB context files for a pdf thumbnail config and didn&#039;t find one. So digging into Share to see if it is creating thumbnails of PDFs the same way you want to do it is another route to take.

Jeff</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tried PDF. My first thought was to verify that ImageMagick can convert PDF to a graphic format. It turns out it can.</p>
<p>So my next thought is maybe the thumbnail classes assume &#8220;graphic in, graphic out&#8221; and aren&#8217;t passing ImageMagick the options necessary to handle PDF. You&#8217;ll need to step through that code with a debugger to find out.</p>
<p>Another idea is to look at Share. I know it uses pdf2swf to convert PDF into a pageable SWF file which opens up when you &#8220;preview&#8221; a document. But it also generates a thumbnail. I grep&#8217;d the OOTB context files for a pdf thumbnail config and didn&#8217;t find one. So digging into Share to see if it is creating thumbnails of PDFs the same way you want to do it is another route to take.</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-36125</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Tue, 02 Jun 2009 06:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-36125</guid>
		<description>Hi Jeff,

Though I can generate thumbnails for image files, I am unable to do the same for PDF and other content types. I have ImageMagick and OpenOffice installed. 

In order to configure PDF, I have added one more bean declaration in someco-thumbnail-context.xml file where I am specifying the contentType as application/pdf for scPdfThumbnail.

I have modified the javascript to generate scPdfThumbnail like:

for each (field in formdata.fields) {
	if (field.name == &quot;file&quot; &amp;&amp; field.isFile) {
		filename = field.filename;
		content = field.content;
		mimetype = field.mimetype;
	}
}

var newDoc = companyhome.createFile(filename);
newDoc.properties.content.write(content);
newDoc.properties.content.mimetype = mimetype;
newDoc.save();

newDoc.createThumbnail(&quot;scPdfThumbnail&quot;, true);

When I run this webscript and upload a pdf file, the script runs successfully and the file is uploaded. But no child thumbnail node is created corresponding to the pdf node.

I am unable to figure out the reason for this. Can you please help me out?

Also, what are the supported content types for which thumbnails can be generated?

Regards,
Kamlesh</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Though I can generate thumbnails for image files, I am unable to do the same for PDF and other content types. I have ImageMagick and OpenOffice installed. </p>
<p>In order to configure PDF, I have added one more bean declaration in someco-thumbnail-context.xml file where I am specifying the contentType as application/pdf for scPdfThumbnail.</p>
<p>I have modified the javascript to generate scPdfThumbnail like:</p>
<p>for each (field in formdata.fields) {<br />
	if (field.name == &#8220;file&#8221; &amp;&amp; field.isFile) {<br />
		filename = field.filename;<br />
		content = field.content;<br />
		mimetype = field.mimetype;<br />
	}<br />
}</p>
<p>var newDoc = companyhome.createFile(filename);<br />
newDoc.properties.content.write(content);<br />
newDoc.properties.content.mimetype = mimetype;<br />
newDoc.save();</p>
<p>newDoc.createThumbnail(&#8220;scPdfThumbnail&#8221;, true);</p>
<p>When I run this webscript and upload a pdf file, the script runs successfully and the file is uploaded. But no child thumbnail node is created corresponding to the pdf node.</p>
<p>I am unable to figure out the reason for this. Can you please help me out?</p>
<p>Also, what are the supported content types for which thumbnails can be generated?</p>
<p>Regards,<br />
Kamlesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-35943</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Fri, 29 May 2009 08:13:04 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-35943</guid>
		<description>Thanks Jeff,

You got it right. I have just changed the lucene query and got my thumbnails :)

- Kamlesh</description>
		<content:encoded><![CDATA[<p>Thanks Jeff,</p>
<p>You got it right. I have just changed the lucene query and got my thumbnails <img src='http://ecmarchitect.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- Kamlesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-35896</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Thu, 28 May 2009 13:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-35896</guid>
		<description>Kamlesh,

I&#039;d have to see your code to be much help but the error sounds as if you are calling a method on an object that is undefined or null. (Also, I don&#039;t recognize the &quot;createFile&quot; method).

If you are trying to use &quot;document.createThumbnail&quot; then make sure your &quot;document&quot; variable is actually set to something. That variable gets set automatically if you execute server-side JavaScript against a piece of content through the web client UI via the &quot;execute script&quot; action. Otherwise, you&#039;ll have to do a search or something else to populate it.

Hope that helps,

Jeff</description>
		<content:encoded><![CDATA[<p>Kamlesh,</p>
<p>I&#8217;d have to see your code to be much help but the error sounds as if you are calling a method on an object that is undefined or null. (Also, I don&#8217;t recognize the &#8220;createFile&#8221; method).</p>
<p>If you are trying to use &#8220;document.createThumbnail&#8221; then make sure your &#8220;document&#8221; variable is actually set to something. That variable gets set automatically if you execute server-side JavaScript against a piece of content through the web client UI via the &#8220;execute script&#8221; action. Otherwise, you&#8217;ll have to do a search or something else to populate it.</p>
<p>Hope that helps,</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh</title>
		<link>http://ecmarchitect.com/archives/2009/03/03/913/comment-page-1#comment-35887</link>
		<dc:creator>Kamlesh</dc:creator>
		<pubDate>Thu, 28 May 2009 07:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=913#comment-35887</guid>
		<description>Hi Jeff,

Thanks for the example and the recorded demo of the same.

I am using Alfresco Labs 3c. I have deployed the thumbnail example to my Alfresco installation. But when I try to upload a file I get the exception:

org.mozilla.javascript.EcmaError - TypeError: Cannot call method &quot;createFile&quot; of undefined (AlfrescoScript#11)

The same exception I am getting with Alfresco Enterprise 3.0.1.

What could be the reason?

Kamlesh</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Thanks for the example and the recorded demo of the same.</p>
<p>I am using Alfresco Labs 3c. I have deployed the thumbnail example to my Alfresco installation. But when I try to upload a file I get the exception:</p>
<p>org.mozilla.javascript.EcmaError &#8211; TypeError: Cannot call method &#8220;createFile&#8221; of undefined (AlfrescoScript#11)</p>
<p>The same exception I am getting with Alfresco Enterprise 3.0.1.</p>
<p>What could be the reason?</p>
<p>Kamlesh</p>
]]></content:encoded>
	</item>
</channel>
</rss>
