我已经尝试但无法获得正确的输出。代码放在下面。
Dim Height, Width As Double
Dim reader As iTextSharp.text.pdf.PdfReader = Nothing
Dim doc As New iTextSharp.text.Document()
reader = New iTextSharp.text.pdf.PdfReader(FILENAME)
iTextSharp.text.pdf.PdfWriter.GetInstance(doc, New FileStream(FILENAME,FileMode.Open))
doc.Open()
Height = doc.PageSize.Height
Width = doc.PageSize.Width
Height = Math.Round(Height)
Width = Math.Round(Width)
doc.Close()