背景图像位置dompdf css2(Background image position dompdf css2)

编程入门 行业动态 更新时间:2024-10-23 11:21:49
背景图像位置dompdf css2(Background image position dompdf css2)

我有一个td ,我需要它在导出为PDF时具有特定的底部边框。 我尝试了很多css片段,然而,没有什么能真正解决这个问题。 这是我在浏览器中完美无缺的工作:

td.underline-dotted-thin{ background-image: url('../thin-dots.png'); background-position: bottom left; background-repeat: no-repeat; }

但是,当使用dompdf将屏幕导出为PDF时,不会应用最后两个属性( background-position和background-repeat )。

任何有关如何解决此问题的帮助或指导都非常感谢。

编辑

图像在导出的pdf中可见,但是,它位于td的中间并被拉伸。

I have a td and I need it to have a specific bottom border when exported as PDF. I have tried many css snippets, however, nothing really solved the issue. This is the closiest that I got and works perfectly in a browser:

td.underline-dotted-thin{ background-image: url('../thin-dots.png'); background-position: bottom left; background-repeat: no-repeat; }

However when the screen is exported as PDF with dompdf, the last two properties (background-position and background-repeat) are not applied.

Any help or guidance for how to solve this issue is much appreciated.

EDIT

The image is visible in the exported pdf, however, it is in the middle of td and is stretched.

最满意答案

截至最新版本(v0.7.0),dompdf不支持background-position或background-size 。

As of the most recent release (v0.7.0) dompdf does not support background-position or background-size.

更多推荐

本文发布于:2023-08-07 11:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464253.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   背景   位置   dompdf   position

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!