CFDocument在循环时忽略背景色 [英] CFDocument ignoring background color when in loop

查看:98
本文介绍了CFDocument在循环时忽略背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在循环生成多个PDF。在循环中创建的pdf 2+的背景颜色完全消失了。不管背景颜色是在CSS中定义为HTML样式,使用十六进制代码还是仅使用颜色名称。

I'm running a loop to build multiple PDFs. The background colors of pdf 2+ created in the loop just plain disappear. Doesn't matter if the background color is defined in CSS, as an HTML style, using hex code or just a color name.

如果我是

有什么想法吗?

推荐答案

这是一个错误,它只会影响保存在内存中的cfdocument,而不会影响直接显示在浏览器中的cfdocument。如果必须将文档保存在内存中,则解决方法非常简单。

This is a bug, it only effects cfdocument saved in memory, it does not effect cfdocuments that are displayed directly to the browser. If you have to save your document in memory, the workaround is pretty simple; use an include or cfc.

myDocument.cfm

<cfdocument name = "myDoc">
 ...
 ...
</cfdocument>

myLoop.cfm

<cfloop ...>
  <cfinclude template= "myDocument.cfm">
</cfloop>

我在这里提到此错误和解决方法: cfdocument防止行中断在行中

I mention this bug and workaround here: cfdocument prevent page breaks mid-row

这篇关于CFDocument在循环时忽略背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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