Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. iTextSharp.text.Font fontbold = iTextSharp.text.FontFactory.GetFont(FontFactory.HELVETICA_BOLD, 10);
  2. iTextSharp.text.Font font5 = iTextSharp.text.FontFactory.GetFont(FontFactory.HELVETICA, 8);
  3.  
  4. //data display
  5. string name =Environment.MachineName;
  6. string date = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss tt");
  7. string empty = "";
  8. string heading = "SUMMARY REPORT";
  9. string beginning = "nAccount Id : " + accountId + "nTestScenarioId : " + testScenarioId + "nMachine Name : " + name + "nScheduledDate : " + date + "nServerURL :" + serverURL + "n " + empty;
  10. Phrase ph = new Phrase(beginning);
  11. Phrase phr = new Phrase(heading);
  12. Paragraph p = new Paragraph();
  13. Paragraph pr = new Paragraph();
  14. p.Font(font5);---------------------------------------------------//Error
  15. pr.Font(fontbold);----------------------------------------------//Error
  16. p.Add(ph);
  17. pr.Add(phr);
  18.  
  19. document.Add(phr);
  20. document.Add(p);
  21.  
  22. p.Font = font5;
  23. pr.Font = fontbold;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement