Can "DAM Update Asset workflow" generate thumbnails for multiple pages of a PDF? | Adobe Higher Education
Skip to main content
Level 2
June 10, 2019

Can "DAM Update Asset workflow" generate thumbnails for multiple pages of a PDF?

We need to generate thumbnails for multiple pages of a PDF asset to allow user have more options to choose from.

It seems from Using PDF Rasterizer, by adding "PDF Rasterizer Handler" step, we can customize the OOBO workflow behavior.

My question is:

Is there a way to update the arguments value (for example -p) to generate thumbnails for multiple PDF pages?

Ce sujet a été fermé aux réponses.

1 commentaire

laura-xieAuteur
Level 2
June 11, 2019

The question is not answered - not sure how to update "Assumed Answered" to "Not Answered"

Adobe Employee
June 11, 2019

All AEM is doing is running the "PDFRasterizer -d -p 1 -s 1280 -t PNG -i ${file}" command directly on the rasterizer software. So, you have to check if rasterizer software allows that operation.

You should be able to run this command directly from the command prompt using the file name. Try using the help command and check if that option is available.

Some of the OOTB options available

-d: Flag to enable smooth rendering of text, vector artwork, and images. Creates better quality images. However, including this parameter causes the command to run slowly and increase the size of images.

-p: Page number. Default value is all pages. '*' denotes all pages.

-s: Maximum image dimension (height or width). This is converted to DPI for each page. If pages are of different size, each may potentially scale by different amount. The default is actual page size.

-t: Output image type. Valid types are JPEG, PNG, GIF and BMP. The default value is JPEG.

-i: Path for input PDF. You must set this parameter.

-h: Help

laura-xieAuteur
Level 2
June 11, 2019

Thanks for the reply.

What do you mean by "you have to check if rasterizer software allows that operation?"

I got the following error in the log after I updated the workflow following exactly in Using PDF Rasterizer

Could it be related to the rasterizer software issue as you mentioned?

11.06.2019 16:25:05.804 *ERROR* [JobHandler: /etc/workflow/instances/server0/2019-06-11/mathworks-dam-update-asset_4:/content/dam/mathworks/white-paper/5G_ebook.pdf/jcr:content/renditions/original] com.day.cq.dam.pdfrasterizer.process.PdfRasterizerHandlingProcess execut

: failed to execute command [[/opt/aem/aeminstall/crx-quickstart/launchpad/felix/bundle723/data/binaries/PDFRasterizer, -d, -p, 1, -s, 1280, -t, PNG, -i, /tmp/cqdam1325151506090818801.tmp/asset_675516a7f9f441c89c99cda14aa9043d.pdf]] for asset [/content/dam/mathworks/whi

e-paper/5G_ebook.pdf]:

org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)

        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)

        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)

        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)

        at com.day.cq.dam.pdfrasterizer.process.PdfRasterizerHandlingProcess.execute(PdfRasterizerHandlingProcess.java:233)

        at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)

        at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:189)

        at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:258)

        at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)

        at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)

        at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)

        at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)