Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Can we optionally use ImageMagick for Preview Generation?
Hi team,
I have a question that can we use both PDF Box and Image Magick for preview generation and dynamically choose it while uploading file..??
Looking forward for answer.
I have a question that can we use both PDF Box and Image Magick for preview generation and dynamically choose it while uploading file..??
Looking forward for answer.
I think selection is just based upon mime type of the file. I think pdfbox gets pdfs where IM gets different types such as png, gif, ...
Thanks David but due to less RAM on our system we cannot use IM fro all files. we just want to use IM for PPT, is it possible??
Jitender Dhiman:
Thanks David but due to less RAM on our system we cannot use IM fro all files. we just want to use IM for PPT, is it possible??
No, this isn't possible out of the box.
What version are you using? From Liferay 6.2, this bug had been solved:
https://issues.liferay.com/browse/LPS-34028
and should increase the stability of your system when converting PDF using default system (PDFBox).
Juan, I think he's saying that IM has the memory issue, not pdfbox.
But still the answer to Jitender's question is no, you cannot be selective in that way.
Besides, Jitender, if your system is that memory constrained, you're going to keep smacking your head into that ceiling again anyway. Just bite the bullet and add memory to the system or VM. In the long run you'll be glad you did.
But still the answer to Jitender's question is no, you cannot be selective in that way.
Besides, Jitender, if your system is that memory constrained, you're going to keep smacking your head into that ceiling again anyway. Just bite the bullet and add memory to the system or VM. In the long run you'll be glad you did.
Jitender Dhiman:
Hi team,
I have a question that can we use both PDF Box and Image Magick for preview generation and dynamically choose it while uploading file..??
Looking forward for answer.
Ok going to the root issue, why do you want to use ImageMagick instead of PDFBox? What Liferay version are you using? In Liferay 6.2 PDFBox library had been upgraded and many issues been solved thanks to that.
We are using 6.1 and documents uploaded on our system are sometimes in GB. So imageMagick takes so long to create document's preview and crashes due to less memory.
PDFBox changes the font of PPTs so we want to use PDFBox for all except PPT which could be done by IM.
Is there any solution?
PDFBox changes the font of PPTs so we want to use PDFBox for all except PPT which could be done by IM.
Is there any solution?
Have you installed and enebled OpenOffice/LibreOffice?
yes Open Office is installed.
this guy also having same issue... but post is 2 year old..
https://www.liferay.com/community/forums/-/message_boards/message/43795408
https://www.liferay.com/community/forums/-/message_boards/message/43795408
Yes, there are memory problems using ImageMagick, which uses Ghostcript.
First of all, you are talking about PPT and PDFBox/ImageMagick. PDFBox should only create previews for PDF files, not PPT. Did you embed PPT inside PDF?
Second, you can check if this issue is reproducible with those documents on Liferay 6.2, as PDFBox had been upgraded. I remember some fonts problem was solved.
Finally, as stated here:
https://issues.liferay.com/browse/LPS-29708?focusedCommentId=333365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-333365
can you check if decreasing :
fixes the memory problem when using ImageMagick?
First of all, you are talking about PPT and PDFBox/ImageMagick. PDFBox should only create previews for PDF files, not PPT. Did you embed PPT inside PDF?
Second, you can check if this issue is reproducible with those documents on Liferay 6.2, as PDFBox had been upgraded. I remember some fonts problem was solved.
Finally, as stated here:
https://issues.liferay.com/browse/LPS-29708?focusedCommentId=333365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-333365
can you check if decreasing :
dl.file.entry.preview.document.dpi=72fixes the memory problem when using ImageMagick?