![](/img/trans.png)
[英]How can I set top margin of the first page of pdf document using iText7?
[英]How to set PDF margin?
目前,我正在工作PDF生成。 我不知道如何在PDF中提供邊距。 我想將PDF底邊距設置為20mm。 我正在使用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);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.