摘要:
我使用html2ps来转换带有内联图像的html文档。(我安装了ImageMagick和libwww-perl。)如果图像是本地的,这很好;但是,当通过URL提供图像时,我只看到图像而不是我的图像。
我还尝试使用wget代替libwww-perl,结果完全相同。任何帮助都是非常感谢的。
代码:
我总是用
html2ps -d example.html > output.ps我在两个地方有相同的图像文件:./local.png和http://www.example.com/remote.png。
以下html将图像插入到ps文档中:
<img src='local.png' />但这一行只是插入单词图像
<img src='http://www.example.com/remote.png' />我得到的输出是
html2ps version 1.0 beta7
Reading example.html
Image: local.png
convert /var/tmp/aaaVtaOy5 /var/tmp/aaaVtaOy5.ppm
Size: 8*10
Image: http://www.example.com/remote.png
Retrieving http://www.example.com/remote.png并创建图像的本地副本。
发布于 2015-05-07 20:51:54
html2ps要求远程文档包括它们的headers。我通过使用wget而不是libwww-perl实现了它:
geturl: "wget --quiet -O - --save-headers";
libwww-perl: 0;这似乎仍然不是最好的解决办法。
https://stackoverflow.com/questions/30108754
复制相似问题