[英]custom page size in pdfbox?
In pdfbox is there a way to set a custom page size for example 6" x 8".在 pdfbox 中有一种方法可以设置自定义页面大小,例如 6" x 8"。 This is the size of runner bib card.这是跑步者围兜卡的尺寸。 The only sizes that seem to be available are the following:似乎可用的唯一尺寸如下:
ReportPageSize pageSize = ReportPageSize.AVERY_5160;
PdfDocInfo doc = new PdfDocInfo(pageSize)
I appreciate any insights.我很欣赏任何见解。
pass a mediabox when creating your page:创建页面时传递媒体框:
private static final float POINTS_PER_INCH = 72;
PDPage page = new PDPage(
new PDRectangle(6 * POINTS_PER_INCH, 8 * POINTS_PER_INCH));
"PdfDocInfo" is not from PDFBox. “PdfDocInfo”不是来自 PDFBox。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.