Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

DAM - Thumbnail not created for MS Word / XLSX assets

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

9 Replies

Avatar

Level 10

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.

Avatar

Administrator

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

                    
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

Avatar

Community Advisor

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

Avatar

Level 2

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

Avatar

Administrator

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...

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

Avatar

Correct answer by
Level 2

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

Avatar

Level 3

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

Avatar

Level 1

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.