Page 1 of 1

ImageMagick and html2ps

Posted: 2007-03-02T04:01:47-07:00
by bizk
I have got ImageMagick and html2ps working together.
But I need to pass a config file to html2ps that changes each time I call the command.

How do I pass the config file to html2ps from a commandline call to Imagemagick?

The command I am using is (pseudocode):

Code: Select all

convert -quality 85 -geometry 600x800 /path/to/page.htm /path/to/output/file.jpg 
Which is working fine.
Somehow I also need to pass it the information of where the config file is:

Code: Select all

/path/to/html2ps/config/file.psconfig
Can anyone give me a clue or 2 as to how I do that?

My delegates file reads:

Code: Select all

  <delegate decode="htm" command='"/path/to/html2ps/html2ps/bin/html2ps" -U -o "%o" "%i"' />
any ideas?

cheers

Biz

Re: ImageMagick and html2ps

Posted: 2007-03-04T17:40:34-07:00
by anthony
You can always DIY it, for example something like this (untested) could be used.

Code: Select all

  html2ps -U -o - image.html | convert ps:- .....

Re: ImageMagick and html2ps

Posted: 2007-03-05T02:02:44-07:00
by bizk
Hi Antony

In the end what I did was to call html2ps directly and convert the html directly into a postscript file. Imagemagick subsequently converts the .ps file to whatever image format I need (jpeg at the moment).

Thanks for your help, I'll probably return to this later on in the project's development (http://www.dutycrew.net if you're interested. Imagemagick will certainly be getting a credit [or two!]). Hopefully it will make raise enough funds, so that we can put something worthwhile back into our open source community.

cheers

Biz