DAM - Thumbnail not created for MS Word / XLSX assets | Community
Skip to main content
Anwar_Sadat
Level 2
May 17, 2016
Solved

DAM - Thumbnail not created for MS Word / XLSX assets

  • May 17, 2016
  • 7 replies
  • 3777 views

Hi,

When we upload a MS Word / Excel file to DAM, renditions and thumbnails are not created. Do I have to install any additional rendition utilities to make it work?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anwar_Sadat

Hi Kautuk - It works after the environment variables for the user (running AEM) is set to identify the path.

7 replies

Ratna_Kumar
Level 10
May 17, 2016

Hi Anwer,

Renditions & thumbnails will be created in DAM, that only be applicable to Graphics and not for MS Word / Excel file.

Hope this helps.

Thanks,
Ratna Kumar.

kautuk_sahni
Community Manager
Community Manager
May 17, 2016

Hi 

To generate a thumbnail for these assets - you need to write a DAM Handler. Within the handler - you can use DAM APIs (com.day.cq.dam.api) to create a thumbnail. To get you up and running with how to write a custom DAM Handler for AEM - see this article: 

Creating a Custom AEM Dam Media Handler

Reference Link:- https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/dam/handler/standard/msoffice/MSOfficeHandler.html

//MSOfficeHandler

                    
Method Summary
 ExtractedMetadataextractMetadata(Asset asset) 
          This method is used by the ExtractMetadataProcess as part of the DAM Update Asset workflow during import or update of an asset.
 BufferedImagegetImage(Rendition rendition) 
          This method retrieves the graphical representation of an Assets given Rendition.
 BufferedImagegetImage(Rendition rendition, Dimension dim) 
          This method retrieves the graphical representation of an Assets given Rendition.
 String[]getMimeTypes() 
          This method returns the mime types a particular AssetHandler supports.

 

Documentation Link:- https://docs.adobe.com/docs/en/aem/6-2/develop/extending/assets/media-handlers.html#Creating a new Media Handler

I hope this may help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
krishna_sai
Community Advisor
Community Advisor
August 28, 2023

Hi @kautuk_sahni , above links seems to be old if you have any latest document links related to it. Can you please attach here.

Thanks,
Krishna

kautuk_sahni
Community Manager
Community Manager
August 28, 2023
Anwar_Sadat
Level 2
May 17, 2016

Hi - I am using a command line process to convert doc to pdf. But it fails with the error:

java.io.IOException: Cannot run program "doc2pdf" (in directory "C:\Users\anwars\AppData\Local\Temp\cqdam9117317203002434457.tmp"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
    at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:246)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:302)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:136)
    at com.day.cq.dam.core.process.CommandLineProcess.execute(CommandLineProcess.java:235)
    at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
    at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:215)
    at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:145)
    at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:366)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 15 common frames omitted

 

Has anyone faced this issue before and got it resolved

kautuk_sahni
Community Manager
Community Manager
May 18, 2016

Anwar Sadat wrote...

Hi - I am using a command line process to convert doc to pdf. But it fails with the error:

java.io.IOException: Cannot run program "doc2pdf" (in directory "C:\Users\anwars\AppData\Local\Temp\cqdam9117317203002434457.tmp"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
    at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:246)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:302)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:136)
    at com.day.cq.dam.core.process.CommandLineProcess.execute(CommandLineProcess.java:235)
    at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
    at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:215)
    at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:145)
    at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:366)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 15 common frames omitted

 

Has anyone faced this issue before and got it resolved

 

Hi,

Please verify the path where your doc2pdf is present, i guess the path mentioned by is not correct.

Or add path of "doc2pdf" to PATH variable.

Reference link:- 

Link 1:- http://stackoverflow.com/questions/32203294/runtime-getruntime-exec-cannot-run-program-createprocess-error-2-the-syste

Link 2:- http://stackoverflow.com/questions/29113042/the-system-cannot-find-the-file-specified-java

 

I hope this would be helpful.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Anwar_Sadat
Anwar_SadatAuthorAccepted solution
Level 2
June 1, 2016

Hi Kautuk - It works after the environment variables for the user (running AEM) is set to identify the path.

nvssr90
Level 2
June 26, 2018

Hi Anwar,

We have the same issue - All the Doc Types we don's see any thumbnails in DAM Assets. What do you mean by environment variables for the user? Can you please elaborate ?

Thanks,

Sai

May 8, 2019

Hi @Anwar Sadat,

Could you please let me know how it worked for you as we are facing the same problem?

could you please share it here would be helpful.

Hi kautuksahni,

Could you please help here.