ItextSharp - 将 pdf 纸张大小设置为 8.5x13

ItextSharp - Set pdf paper size to 8.5x13

我正在尝试在 VB.NET

中设置生成的 pdf 的纸张大小
Dim myWidth As String
Dim myHeight As String
myWidth = "8.5"
myHeight = "1300"
Dim pgSize As New iTextSharp.text.Rectangle(myWidth, myHeight)
Dim doc As New iTextSharp.text.Document(pgSize.Rotate, 0.0F, 0.0F, 0.0F, 100.0F)

但问题是纸张尺寸没有设置为 8.5x13

生成的PDF纸张大小为Width=8.26 and Height=11.69

如何将纸张尺寸更改为 8.5X13 并旋转?

没关系,伙计们,我在这里找到了参考资料 http://www.dotnetfox.com/articles/how-to-change-pdf-document-page-size-in-Asp-Net-with-C-Sharp-usng-itextsharp-1024.aspx

这就是我所做的

 PdfDoc = New Document(New Rectangle(579.5F, 936.0F).Rotate)