非常抱歉,我只是PDFsharp的初学者。
如何将文档的页面大小设置为A4呢?请问应该怎么做?以下是我的代码,谢谢。
Document document = new Document();
// Add a section to the document
Section section = document.AddSection();
section.AddParagraph("dddddd");
// Add a section to the document
var table = section.AddTable();
table.AddColumn("8cm");
table.AddColumn("8cm");
var row = table.AddRow();
var paragraph = row.Cells[0].AddParagraph("Left text");
paragraph.AddTab();
paragraph.AddText("Right text");
paragraph.Format.ClearAll();
// TabStop at column width minus inner margins and borders:
paragraph.Format.AddTabStop("27.7cm", TabAlignment.Right);
row.Cells[1].AddParagraph("Second column");
table.Borders.Width = 1;