Hallo Folks, is it possible, to set a new font (Courier New) for adding a annonation?
Here my Code: 'Open the pdf using pdfreader 180: Dim reader As New iTextSharp.text.pdf.PdfReader(inputPdf) 'create a filestream for output 190: Dim fs As New System.IO.FileStream(outputPdf, System.IO.FileMode.Create, System.IO.FileAccess.Write) 'use stamper to copy the source pdf to output 200: Dim stamper As New iTextSharp.text.pdf.PdfStamper(reader, fs) 'Maßeinheiten sind Points 'Einheiten; In der iText Bibliothek wird die typographische Einheit Punkt verwendet. 72 Punkte 'ergeben ein Inch oder 0.4cm. Eine A4 Seite hat somit 595 Punkte in der Breite und 842 Punkte in der Höhe. 210: Console.WriteLine() 220: Console.WriteLine("Edit PDF:") 230: Console.WriteLine(StrDup(9, "=")) 240: For i = 1 To UBound(myComments) 250: If myComments(i).Page > 0 Then 260: Console.WriteLine("Kommentar " & i & " wird in PDF eingefügt.") 270: Dim rect As New iTextSharp.text.Rectangle(myComments(i).Left, (iTextSharp.text.PageSize.A4.Height - myComments(i).Top), myComments(i).Left, (iTextSharp.text.PageSize.A4.Height - myComments(i).Top)) 280: Dim annotText As String = myComments(i).Comment 290: Dim shouldOpen As Boolean = False 300: Dim iconStyle As String = "Comment" 'iconstyle=> Comment ; Key ; Note ; Help ; NewParagraph ; Paragraph ; Insert 310: Dim pageNumber As Integer = myComments(i).Page 'The page number to add this annotation to 320: If pageNumber > reader.NumberOfPages Then Exit Function 'open = True|False -> Acrobat Reader wird bei open die Meldung sofort angezeigt und nicht erst mei Mouseover 330: Dim annot As iTextSharp.text.pdf.PdfAnnotation = iTextSharp.text.pdf.PdfAnnotation.CreateText(stamper.Writer, rect, "Titel", annotText, shouldOpen, iconStyle) 340: stamper.AddAnnotation(annot, pageNumber) 'When done, close both the stamper and the reader 350: End If 360: Next 370: stamper.Close() 380: reader.Close() Thanks for all. Constantin P.S. Sorry for my bad english! -- View this message in context: http://itext-general.2136553.n4.nabble.com/Set-Font-for-new-Annonation-tp4658182.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php