I have html2ps installed and working, but I can not get ImageMagick to delegate html conversions to html2ps. How can I make ImageMagick aware of html2ps?
I am running ImageMagick-6.6.1-3-Q16 on Windows 7. I have installed ActivePerl 5.10.1.1007. I checked the "Install PerlMagick" check box when installing ImageMagick. I have installed Ghostscript 8.64. I have set my system PATH variable to point to the Ghostscript, ImageMagick, and Perl directories. I ran the html2ps-1.0b6 install script which detects ImageMagick, GhostScript, and UserAgent.pm; the html2ps install script does NOT detect Image\Magick.pm. I have edited the @html2ps and set PerlMagick to 1. I can invoke conversions on html2ps using the command "perl html2ps file.html > file.ps".
Thanks for any help!
How to integrate html2ps with ImageMagick
Re: How to integrate html2ps with ImageMagick
Post the output of this command:
- convert -verbose index.html index.png
Re: How to integrate html2ps with ImageMagick
>convert -verbose index.html index.png
html2ps -U -o "C:/Users/ETHANL~1/AppData/Local/Temp/magick-iCMZDbRn" "C:/Users/ETHANL~1/AppData/Local/Temp/magick-x5lOSkc5"
convert: `%s' (%d) html2ps -U -o "C:/Users/ETHANL~1/AppData/Local/Temp/magick-iCMZDbRn" "C:/Users/ETHANL~1/AppData/Local/Temp/magick-x5lOSkc5" @ error/utility.c/SystemCommand/1982.
convert: delegate failed `html2ps -U -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `C:/Users/ETHANL~1/AppData/Local/Temp/magick-x3W6SbNE': No such file or directory @ error/blob.c/OpenBlob/2489.
convert: unable to open file `C:/Users/ETHANL~1/AppData/Local/Temp/magick-x3W6SbNE': No such file or directory @ error/constitute.c/ReadImage/572.
convert: missing an image filename `index.png' @ error/convert.c/ConvertImageCommand/2970.
html2ps -U -o "C:/Users/ETHANL~1/AppData/Local/Temp/magick-iCMZDbRn" "C:/Users/ETHANL~1/AppData/Local/Temp/magick-x5lOSkc5"
convert: `%s' (%d) html2ps -U -o "C:/Users/ETHANL~1/AppData/Local/Temp/magick-iCMZDbRn" "C:/Users/ETHANL~1/AppData/Local/Temp/magick-x5lOSkc5" @ error/utility.c/SystemCommand/1982.
convert: delegate failed `html2ps -U -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `C:/Users/ETHANL~1/AppData/Local/Temp/magick-x3W6SbNE': No such file or directory @ error/blob.c/OpenBlob/2489.
convert: unable to open file `C:/Users/ETHANL~1/AppData/Local/Temp/magick-x3W6SbNE': No such file or directory @ error/constitute.c/ReadImage/572.
convert: missing an image filename `index.png' @ error/convert.c/ConvertImageCommand/2970.
Re: How to integrate html2ps with ImageMagick
We verified html2ps works under Linux. You can try editing html2ps and add the path of perl as the first line of the script. Otherwise try editing delegates.xml and change 'html2ps' to 'perl html2ps' and let us know if that fixes the problem.
Re: How to integrate html2ps with ImageMagick
The html2ps file seems to already have perl as the first line:
: # Use perl
eval 'exec C:\Perl64\bin\perl.exe -S $0 "$@"'
Altering the delegates.xml file seems the most promising. However, i should have mentioned that I have never been able to run the command: 'perl html2ps -u -o index.ps index.html'. I have always had to point to the html2ps script as follows: 'perl "C:\Program Files (x86)\html2ps\bin\html2ps" -u -o index.ps index.html'. What settings would I have to alter to avoid specifying the path to the script? I tried adding the following in the delegates.xml file:
<delegate decode="html" command="perl "C:\Program Files (x86)\html2ps\bin\html2ps" -U -o "%o" "%i""/>
but get the following error:
>convert index.html index.png
Can't open perl script "C:Program": No such file or directory
convert: delegate failed `perl "C:\Program Files (x86)\html2ps\bin\html2ps" -U -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `C:/Users/ETHANL~1/AppData/Local/Temp/magick-dB3g0ine': No such file or directory @ error/blob.c/OpenBlob/2489.
convert: unable to open file `C:/Users/ETHANL~1/AppData/Local/Temp/magick-dB3g0ine': No such file or directory @ error/constitute.c/ReadImage/572.
convert: missing an image filename `index.png' @ error/convert.c/ConvertImageCommand/2970.
I have also experimented with \\ for backslashes and for spaces, but have not had any success.
: # Use perl
eval 'exec C:\Perl64\bin\perl.exe -S $0 "$@"'
Altering the delegates.xml file seems the most promising. However, i should have mentioned that I have never been able to run the command: 'perl html2ps -u -o index.ps index.html'. I have always had to point to the html2ps script as follows: 'perl "C:\Program Files (x86)\html2ps\bin\html2ps" -u -o index.ps index.html'. What settings would I have to alter to avoid specifying the path to the script? I tried adding the following in the delegates.xml file:
<delegate decode="html" command="perl "C:\Program Files (x86)\html2ps\bin\html2ps" -U -o "%o" "%i""/>
but get the following error:
>convert index.html index.png
Can't open perl script "C:Program": No such file or directory
convert: delegate failed `perl "C:\Program Files (x86)\html2ps\bin\html2ps" -U -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `C:/Users/ETHANL~1/AppData/Local/Temp/magick-dB3g0ine': No such file or directory @ error/blob.c/OpenBlob/2489.
convert: unable to open file `C:/Users/ETHANL~1/AppData/Local/Temp/magick-dB3g0ine': No such file or directory @ error/constitute.c/ReadImage/572.
convert: missing an image filename `index.png' @ error/convert.c/ConvertImageCommand/2970.
I have also experimented with \\ for backslashes and for spaces, but have not had any success.