在区域内包含 DomPDF 文本对象
我一直在使用DomPDF创建动态创建的PDF,我偶然发现了一个我无法解决的问题。
有没有办法给对象指定宽度和高度,以便文本自动换行在提供的区域中?我已经查看了文档,但没有找到任何有帮助的内容。
I've been using DomPDF to create a dynamically created PDF, and I've stumbled upon a problem that I can't figure out.
Is there a way to give the object a width and height so that the text automatically wraps in the area provided? I've had a look at the documentation but there's nothing that I can find that would be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过获取字符串并将其分割为一定长度,然后使用文本对象逐行插入每一行来解决这个问题。
Got around this by taking the string, and splitting it to a certain length then using the text object to insert each line in one by one.