Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

3.1 ImageMagick PDF Request


Reply


2 Posts   353 Views

Avatar
tazzydemon

Community Member, 124 Posts

29 April 2013 at 2:26pm

Guys,

One huge advantage of ImageMagick (IMHO) is that it can make images out of PDFs. Many clients want thumbnails of their pdfs so that they can link to that.

So, I rather naively told File.php that .pdf files were Images, hoping that a thumbnail would just be created. Doh!

But I did copy a pdf as a png (ludicrous I know) and lo and behold the system made a thumb out of it and it worked.

I am therefore suggesting that if a pdf is uploaded, the upload system is arranged to make a png or jpg copy of the pdf and store that as well so it can be used for link purposes. I think this would a a popular idea. I will try to present an example myself.

Julian

Avatar
tazzydemon

Community Member, 124 Posts

29 April 2013 at 2:28pm

By the way, is the correct syntax with ImageMagick config

YML:

Image:
backend: 'ImagickBackend'

or _config.php:

Image::set_backend('ImagickBackend');

When to use the different type of config and what the arguments might be as as clear as mud.