到目前为止我搜索了什么?
这篇文章已经被检查过,但对我没有帮助。
问题详情
我正在尝试将 td 内容集中在 NetSuite Advanced PDF HTML Template 中。您能建议一下为什么它不在预览中将 td 内容居中吗?
当我打开模板时,它看起来非常好。截图如下
当我查看预览时,它看起来如下
HTML 代码
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
</head>
<body padding="0.25in 0.24in 0.25in 0.25in" size="Letter">
<#if record.item?has_content>
<table style="width: 100%; border: 1px solid red;">
<tr>
<td style="text-align: center;">
REMIT TO:<br />Company Name here<br />Address Line here with<br/>Another address line Code
</td>
<td style="text-align: center;">
REMIT TO:<br />Company Name here<br />Address Line here with<br/>Another address line Code
</td>
<td style="text-align: center;">
INVOICE<br/>123456789012345<br/>12-January-2023
</td>
</tr>
</table>
</#if>
</body>
</pdf>
将 XML 转换为 PDF 的 BFO 生成器不支持所有 CSS 样式。但是,对于文本对齐,您可以使用支持的
text-align
属性。换句话说,而不是使用
style="text-align: center;"
你可以使用
text-align="center"
请参阅
BFO 网站上的
text-align
页面。