Page 1 of 1

IMagicK for Text Based Files

Posted: 2010-11-14T16:28:36-07:00
by mike634
I have noticed IMagicK does not support any of the text based file formats (txt, doc, rtf etc.)

Does anyone know if its possible to somehow still use IMagicK to generate images for these text based file types?

And if it is not possible - Is there some other method/software out there that accomplishes this task?

Thanks in advance.

Re: IMagicK for Text Based Files

Posted: 2010-11-14T16:41:34-07:00
by GreenKoopa
I have never done this personally, but I saw some examples over at:
ImageMagick v6 Examples > Text to Image Handling > Text - Formatted Pages of Text

For alternatives: Are you on Windows? Require a command-line interface?

Re: IMagicK for Text Based Files

Posted: 2010-11-14T17:07:44-07:00
by mike634
Thanks GreenKoopa,

I using a Linux server (LAMP setup)

A command-line interface would be perfect


I'm curious though, do you know of a good option for windows?

Re: IMagicK for Text Based Files

Posted: 2010-11-14T17:50:11-07:00
by GreenKoopa
Disgracefully, I am limited in my Linux knowledge. On Windows, I use Bullzip's PDF Printer. Installed as a print driver, it converts a print job to a file. Despite the name, several save formats are supported. It supports command-line and COM interfaces, but I have yet to personally use those. Because it is a print driver, it supports nearly any file format you have software to read (but no file format you don't).

Re: IMagicK for Text Based Files

Posted: 2010-11-14T20:51:46-07:00
by anthony
IMagick would somehow 'read' and image. That same 'read' is also the way you 'read' (create) text images.

That is read("jpg:image.jpg") and read("label:Some text") are both handled in exactly the same way in ALL ImageMagick API's.


The major point however is that you will also often need to set some options before reading. things like pointsize, font, density, fill color, stroke color, stroke width, etc etc etc.