1
我想添加一个新的页面到PDF文档,但由于某种原因,这没有发生。也许我的其他问题https://stackoverflow.com/questions/11428878/itextsharp-splitlate-not-working与此有关,因为这个问题中的表没有中断,也没有创建新的页面。 这是我对新的页面添加代码:Document.NewPage()不添加新页面
Document doc = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4.Rotate(),20,20,20,40);
string rep1Name; // variable to hold the file name of the first part of the report
rep1Name = Guid.NewGuid().ToString() + ".pdf";
FileStream output = new FileStream(System.Web.HttpContext.Current.Server.MapPath("~/ReportGeneratedFiles/reports/" + rep1Name), FileMode.Create);
PdfWriter pdfWriter = PdfWriter.GetInstance(doc, output);
doc.Open();
doc.NewPage();
doc.NewPage();
doc.Close();
非常感谢!它现在的作品! – user1517150 2012-07-14 11:19:00