IMagicK for Text Based Files

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
mike634
Posts: 3
Joined: 2010-11-14T16:23:58-07:00
Authentication code: 8675308

IMagicK for Text Based Files

Post 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.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: IMagicK for Text Based Files

Post 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?
mike634
Posts: 3
Joined: 2010-11-14T16:23:58-07:00
Authentication code: 8675308

Re: IMagicK for Text Based Files

Post 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?
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: IMagicK for Text Based Files

Post 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).
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: IMagicK for Text Based Files

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply