Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我正在生成PDF。我不知道如何在 PDF 中提供边距。我想将 PDF 下边距设置为 20 毫米。我正在使用delivaryTable.SpacingAfter = 10.04f;代码
delivaryTable.SpacingAfter = 10.04f;
我该怎么做?
您可以在实例化文档对象时设置 pdf 边距。这是语法构造函数:
public Document( Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom)
这是一个使用示例:
Document doc = new Document(PageSize.A4, 20, 20, 20, 20);