小编use*_*185的帖子

iTextSharp table.SpacingBefore not not working

我有一张桌子,我试图从pdf文件的上边缘向下约20/30个浮点(f).我想稍微向下空间的原因是因为我的pdf文档边缘有一个矩形边框.

PdfPTable table = new PdfPTable(1);
table.SpacingBefore = 20f;
table.SpacingAfter = 20f;
table.TotalWidth = 700f;
table.LockedWidth = true;
Run Code Online (Sandbox Code Playgroud)

table.SpacingAfter工作得非常好,但table.SpacingBefore不会,我的桌子只是坐在上边缘,根本不会空间/垫.

c# pdf itext itextsharp

5
推荐指数
1
解决办法
7776
查看次数

标签 统计

c# ×1

itext ×1

itextsharp ×1

pdf ×1