DOMPDF图像未显示在新服务器上 [英] DOMPDF images not showing on new server

查看:51
本文介绍了DOMPDF图像未显示在新服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序,该应用程序使用DOMPDF输出基于HTML页面的PDF报告。

I've created an application which outputs a PDF report based on an HTML page using DOMPDF.

这在我的测试服务器上可以正常工作,但是当将其迁移到实时服务器,没有图像显示在PDF中。它并没有显示RED X-根本没有显示。

This works fine on my test server, but when I've migrated it over to the live server, none of the images show in the PDF. It's not showing a RED X - just nothing there at all.

我已经使用配置工具检查了新服务器是否满足要求,并且启用了

I've checked that the new server meets the requirements using the config tool, and I've enabled the "leave images in temp" debugging option, and nothing is being created in the the temp directory.

任何想法可能会发生什么变化以使其无法正常工作?

Any ideas what might have changed to stop it from working?

推荐答案

看来,如果您的CSS将图像指定为display:block,则DOMPDF有时不会显示它们。更改了我的代码,使其不使用pdf特定的CSS文件。

It appears that if your CSS specifies your images as display:block, DOMPDF won't show them sometimes. Have changed my code so that it uses a pdf-specific CSS file without that it.

不知道为什么它可以在其他服务器上工作....

No idea why it worked on the other server though....

这篇关于DOMPDF图像未显示在新服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆