I have tried many examples found from Google without a lot of luck.
I have below but cannot implement without getting "System.InvalidCastException: 'Conversion from string "Report by: Some Text" to type 'Integer' is not valid.'" and do not understand why it is wanting to convert to Integer.
ERROR ON THIS LINE:
Code:pdfParagraph.Add("Report by: Some Text", Ffont)Code:Dim pdfFont As BaseFont = BaseFont.CreateFont("c:\windows\fonts\Arial.ttf", BaseFont.IDENTITY_H, True) Dim Ffont As New iTextSharp.text.Font(pdfFont, 8, iTextSharp.text.Font.NORMAL) 'pdfParagraph.Add(Ffont) 'Dim pdfFont As iTextSharp.text.Font = New Font(FontFactory.GetFont(FontFactory.TIMES_ROMAN, 8.0F, Font.Bold, BaseColor.BLACK)) pdfParagraph.Add("Report by: Some Text", Ffont) pdfDoc.Add(pdfParagraph)




Reply With Quote