how to rotate pdf using itextsharp library
hi ho开发者_如何学Gow do we rotate PDF using itext library. Thanks
If you writing to a new PDF document, the following line will create a new A4 page rotated (into landscape)
Document doc = new Document(PageSize.A4.Rotate());
This is a very simple example:
Document pdf = new Document(PageSize.A4);
PdfWriter.GetInstance(pdf, new FileStream("file.pdf", System.IO.FileMode.Create));
pdf.Open();
pdf.Add(new Paragraph("This is a pdf document!"));
pdf.Close();
Edit: My mistake, I read "how to create pdf ...". That is what the example above does. I am sorry.
精彩评论