I have created a pdf which has tables, paragraphs etc. It works great until
I try to add in a: document.newPage();  I want to be able to force a new
paragraph section to a new page. The following is the error I get plus the
code. I have been searching the tutorials, google, and the iText-questions
Archives with no success. 

 

Thanks in advance,

 

 

'iTextSharp.text.Document' does not contain a definition for 'newPage' and
no extension method 'newPage' accepting a first argument of type
'iTextSharp.text.Document' could be found (are you missing a using directive
or an assembly reference?)

 

    String filePath = ConfigurationManager.AppSettings["ExportPath"] +
"\\Temp\\PDF\\" + rowLMR["path"].ToString().Trim() + loanNumber + ".tmp";

    Document document = new Document();

    try

    {                                            

      PdfWriter pdfWriter = PdfWriter.GetInstance(document, new
FileStream(filePath, FileMode.Create));

      document.Open();

 

 

      document.Add(new Phrase(new Chunk("                                 ",
FontFactory.GetFont(FontFactory.HELVETICA, 14,
iTextSharp.text.Font.BOLD))));

      document.Add(new Phrase(new Chunk("stuff",
FontFactory.GetFont(FontFactory.HELVETICA, 14,
iTextSharp.text.Font.BOLD))));

 

 

      document.newPage();

      document.Add(new Paragraph(new Chunk("more stuff on new page",
FontFactory.GetFont(FontFactory.HELVETICA, 8, iTextSharp.text.Font.BOLD))));

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to