CFdocument 丢失 CSS 的边框底部

CFdocument losing CSS for border-bottom

在 CF10 中使用 CFdocument 创建 pdf 时,我丢失了很多 css。是否有任何文档显示允许将 css 用于 CFdocument 的内容,或者它只是继续尝试并成功或失败。现在我只是想添加一个 border-bottom 样式,它不会显示它是内联样式还是层叠样式 sheet.

有谁知道我在哪里可以找到 CSS 可用于 CFdocument 的内容,以帮助我显示此边框底部以及未显示的其他 CSS。

<cfdocument format="pdf" scale="75" backgroundvisible="yes" overwrite="no" fontembed="yes">
<tr style="border-bottom: solid 1px coral;"> 

支持的 CSS 样式下的文档就在那里 - cfdocument 我认为自 ColdFusion 9 以来支持的标签没有改变。

Supported CSS styles

The cfdocument tag supports the following CSS styles:

background

background-attachment

background-color

background-image

background-position

background-repeat

border

border-bottom

border-bottom-color

border-bottom-style (solid border only)

border-bottom-width

border-color

border-left

border-left-color

border-left-style (solid border only)

border-left-width

border-right

border-right-color

border-right-style (solid border only)

border-right-width

border-spacing

border-style (solid border only)

border-top

border-top-color

border-top-style (solid border only)

border-top-width

border-width

bottom

clear

clip

color

content (strings, counters only)

counter-increment

counter-reset

cursor

display

float

font

font-family

font-size

font-style

font-weight

height

left

letter-spacing

line-height

list-style-type

margin

margin-bottom

margin-left

margin-right

margin-top

outline

outline-color

outline-style (solid, dotted, dashed only)

outline-width

padding

padding-bottom

padding-left

padding-right

padding-top

page-break-after

page-break-before

page-break-inside

position

right

text-align (left, right, and center)

text-decoration

text-indent

top

unicode-bidi

vertical-align

visibility

white space (normal, nowrap only)

width

z-index

您可以在 cfdocument 中使用 CSS,如下所示:

<cfheader name="Content-Disposition" value="inline; filename=Example.pdf">
<cfcontent type="application/pdf">
<cfdocument format="pdf" orientation="landscape">
<style>
    tr {padding-top: 5px}
    td {font-size: 8px; padding-top: 2px}
</style>
<table>
    <tr>
        <td>
            Example
        </td>
    </tr>
</table>

我通过在 tr 上使用 class 解决了这个问题。

tr.border_bottom td {
  border-bottom:1pt solid black;
}