1

目前我正在生成PDF。我不知道如何在 PDF 中提供边距。我想将 PDF 下边距设置为 20 毫米。我正在使用delivaryTable.SpacingAfter = 10.04f;代码

我该怎么做?

4

1 回答 1

5

您可以在实例化文档对象时设置 pdf 边距。这是语法构造函数:

public Document(
Rectangle pageSize,
float marginLeft,
float marginRight,
float marginTop,
float marginBottom)

这是一个使用示例:

Document doc = new Document(PageSize.A4, 20, 20, 20, 20);
于 2013-06-07T14:13:12.050 回答