Hello,
How can I write a javascript which recreates the PDF preview of a document?
For thumbnails you can use the following tow commands for recreation:
document.createThumbnail("doclib", true);
document.save();
Reason ist, that I have sveral documents where the preview is not working. The reason for this problem was a transfomer issue combined with to few system resources. Using the above command I was able to recreate all thumbnails.
Thanks,
Florian
Try using:
document.createThumbnail("pdf", true); document.save();
Thank you for the information. Can this method also be used for images?
I have two examples:
One image where thumbnail (detail view) and preview (gallery view) is working, the image has two subnotes:
cm:doclib cm:imgpreview
On an image where thumbnail and preview does not work, this subnodes do not exists.
document.createThumbnail("doclib", true); document.createThumbnail("imgpreview", true); document.save();
Would this work, or how can I write a script which creates thes two subnodes?
And last question, is there a possibility to improve the "convert" process?
Thanks,
Florian
You can create missing renditions using rendition name.
document.createThumbnail("pdf", true); document.createThumbnail("doclib", true); document.createThumbnail("imgpreview", true); document.save();
Can you provide additional details on convert/transformation improvements?
Hi,
thank you for the clarification, this has helped a lot.
According to the convert performance:
Currently we are not using the T-Engine, this is a future project of us. We are using the jodconverter an image magick. This is the currentl configuration of alfresco-global.properties:
# # External locations #------------- jodconverter.officeHome=/usr/lib/libreoffice jodconverter.portNumbers=8101 jodconverter.enabled=true ### Jod converter file size settings ### content.transformer.JodConverter.extensions.docx.pdf.maxSourceSizeKBytes=15000 # # Image magick # img.root= img.exe=/usr/bin/convert
If I execute the script to create the different renditions, al lot of convert processes are started parallel. Is there a chance to set the max number of parallel convert processes?
Florian
You may try using an asynchronous action for that process, since this kind of elements are executed using a Thread Pool.
default.async.action.threadPriority=1 default.async.action.corePoolSize=8 default.async.action.maximumPoolSize=20
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.