문제

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.

This is not an issue if I were to create 2 pdfs in a row without a loop.

Any idea what gives?

도움이 되었습니까?

해결책

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>

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top