Not able to preview .ply files

cancel
Showing results for 
Search instead for 
Did you mean: 
manav
Active Member II

Not able to preview .ply files

I have an STL previewer which can preview the file with mime type "application/slain alfresco. So I want to render the file with the mime type "application/ply" as "application/sla". For this, I have created a rule on a folder with the following script

 

var renderingEngineName = 'reformat';
var renditionDefinitionName = 'cm:stl';
var renditionDef = renditionService.createRenditionDefinition(renditionDefinitionName, renderingEngineName);
renditionDef.parameters['mime-type'] = 'application/sla';
renditionService.render(document, renditionDef);

 

And I am also able to see rendition child in node browser as given in a below image 

 

 

But still, I am not able to get a preview of the files with mime type "application/pla".

I would be great if anyone can help me with this.

4 Replies
afaust
Master

Re: Not able to preview .ply files

You must register your transformation as a thumbnail definition via a Spring bootstrap configure and customize the web previewer component to actually use your rendition for display. Look at how the PDF preview thumbnail definition is registered and referenced in the web-preview configuration.

manav
Active Member II

Re: Not able to preview .ply files

Thanks, Axel

I have registered thumbnail in the following way

<bean id="thumbnailDefinitionSTLpreview" class="org.alfresco.repo.thumbnail.ThumbnailDefinition">
        <property name="name" value="stl" />
        <property name="mimetype" value="application/sla" />
        <property name="transformationOptions">
            <!-- The thumbnail definition have transformationOptions mandatory -->
            <!-- But there are none for pdf, so use SWFTransformationsOptions as a dummy -->
            <bean class="org.alfresco.repo.content.transform.swf.SWFTransformationOptions">
                <property name="flashVersion" value="9" />
            </bean>
        </property>
     </bean>
    
      <bean id="baseThumbnailRegistry" abstract="true">
        <property name="contentService" ref="ContentService"/>
        <property name="renditionService" ref="renditionService" />
        <property name="transactionService" ref="TransactionService" />
        <property name="tenantAdminService" ref="tenantAdminService" />
        <property name="redeployStaticDefsOnStartup" value="${system.thumbnail.redeployStaticDefsOnStartup}" />
        <property name="thumbnailDefinitions">
            <list>
                <ref bean="thumbnailDefinitionMedium" />
                <ref bean="thumbnailDefinitionDoclib" />
                <ref bean="thumbnailDefinitionImgpreview" />
                <ref bean="thumbnailDefinitionAvatar" />
                <ref bean="thumbnailDefinitionAvatar32" />
                <ref bean="thumbnailDefinitionPDFpreview" />
                <ref bean="thumbnailDefinitionWebpreview" />
                <ref bean="thumbnailDefinitionSTLpreview" />
            </list>
        </property>
        <property name="thumbnailRenditionConvertor" ref="thumbnailRenditionConvertor" />
     </bean>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

and in "web-preview.get.config.xml" have also added following code

<condition mimeType="application/sla">
      <plugin src="webpreview" paging="true">STLViewer</plugin>
      <plugin srcMaxSize="500000">Image</plugin>
</condition>

<condition thumbnail="stl">
         <plugin src="stl" paging="true">STLViewer</plugin>
</condition>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

and in order to create a thumbnail, I am executing a script on a folder rule which is as follows

document.createThumbnail("stl", true);
document.save();‍‍

and also able to see "cm:thumbnail" child in node browser as shown in below image

But unfortunately still, I am not getting the preview of files with "application/ply" mime type.

I am attaching two more images below to make you more clear with a situation

this is how my actual file with "application/sla" mime type is getting previewed. But file with mime type is not getting preview properly which can be seen in below image

 

4535992
Senior Member

Re: Not able to preview .ply files

Have you found the solution?

cristinamr
Advanced

Re: Not able to preview .ply files

Please @4535992 don't answer a very old thread. Instead of, please open a new one, explain in detail which issue are you having, attach logs, etc.. and we will try to help you.

 

--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc