java - 如何在 itext pdf Java 中创建无边框的 pdfTemplate?并且它也延伸到下一页
问题描述
PdfTemplate template = cb.createTemplate(width, height);
template.addImage(bg, width, 0, 0, height-10, 0, 0);
template.addImage(signature, 39, 0, 0, 39, 15, height-50);
BaseFont bf = BaseFont.createFont(fontPath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font arabfont = new Font(bf, 8);
ColumnText.showTextAligned(template, Element.ALIGN_LEFT,
new Phrase("XXXXXXXXX",arabfont), 60, height-25, 0);
ColumnText.showTextAligned(template, Element.ALIGN_LEFT,
new Phrase("XXXXXXXXX", new Font(Font.TIMES_ROMAN , 11, Font.BOLD)), 60, height-40, 0);
template.addImage(profileimg, 47, 0, 0, 55, (width/2)+60, (height/2)+10);
Integer h=20;
for (String detail : details) {
ColumnText.showTextAligned(template, Element.ALIGN_LEFT,
new Phrase(detail, new Font(Font.HELVETICA , 8, Font.BOLD)), 10, (height-40)-h, 0);
h=h+10;
}
在这个图像中有一个模板边框,延伸到下一页。
解决方案
推荐阅读
- javascript - 如何在 div 标签中包含 django html 模板?
- javascript - JavaScript 如何将输入数据格式化为特定的表达式
- c++ - 如何处理字符串中的垃圾字符?
- python - 曼哈顿度量中的 Voronoi 图
- python-3.x - tkinter Treeview 内存韭菜
- python - 如何使用 Python 从 API 获取令牌?
- flutter - 我们如何访问颤振小部件中的列表项?
- java - 如何使用无线电组可见/不可见线性布局?
- javascript - 无法与 Node JS 服务器作为对等方建立 WebRTC 连接
- python - 在列表中拆分字符串时,Python 仅垂直打印