我有一个通过 Prawn 生成的 PDF,其中包含 HTML 代码。对于每个<br>
或一对<br>
s,我想用 Prawn 的text
方法插入一个新段落。给定这个字符串:
sharemarket is a minnow by world standards, at just 2.5 per cent of the global sharemarket value. <br><br>One approach for local investors might be via an international share fund, with the fund manager
我想<br><br>
结束当前段落,如下所示:
pdf.text "sharemarket is a minnow by world standards, at just 2.5 per cent of the global sharemarket value."
然后text
从这一点开始一个新的:
pdf.text "One approach for local investors might be via an international share fund, with the fund manager"
任何帮助将不胜感激。有点卡在这里。