IronPDF How-Tos Draw Text & Bitmap How to Draw Text and Bitmap on PDFs Chaknith Bin Updated:July 28, 2025 Drawing text and images on a PDF involves adding text and images to an existing document. IronPDF seamlessly enables this feature. By incorporating text and images, users can customize PDFs with watermarks, logos, and annotations, improving the document's visual appearance and branding. Additionally, text and images facilitate the presentation of information, data visualization, and the creation of interactive forms. Get started with IronPDF Start using IronPDF in your project today with a free trial. First Step: Start for Free How to Draw Text and Image on PDFs in C# Download the C# library for IronPDF to draw text and images on PDFs Import the targeted PDF document Use the DrawText method to add text with the desired font to the imported PDF Add an image to the PDF using the DrawBitmap method Export the edited PDF document Draw Text on PDF Example By utilizing the DrawText method available for the PdfDocument object, you can add text to an existing PDF without altering its original content. :path=/static-assets/pdf/content-code-examples/how-to/draw-text-and-bitmap-draw-text.cs using IronPdf; using IronSoftware.Drawing; ChromePdfRenderer renderer = new ChromePdfRenderer(); PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>"); // Draw text on PDF pdf.DrawText("Some text", FontTypes.TimesNewRoman.Name, FontSize: 12, PageIndex: 0, X: 100, Y: 100, Color.Black, Rotation: 0); pdf.SaveAs("drawText.pdf"); IRON VB CONVERTER ERROR developers@ironsoftware.com $vbLabelText $csharpLabel Available Fonts in FontTypes Class The DrawText method currently supports all Standard Fonts in IronPDF, including Courier, Arial (or Helvetica), Times New Roman, Symbol, and ZapfDingbats. Visit the 'Standard Fonts in IronPDF' section in the Manage Fonts article for italic, bold, and oblique variants of these font types. The ZapfDingbats font, in particular, can be used to display symbols such as ✖❄▲❪ ❫. For a comprehensive list of supported symbols, you can visit Wikipedia on Zapf Dingbats. Output fonts sample on PDF Draw Text with Newline The draw text action supports newline characters, allowing you to render text with built-in newlines for better formatting and visual clarity. To achieve this, add newline characters (\n) to the text string. Using the example above, you can draw: string textWithNewlines = "Some text\nSecond line"; pdfDoc.DrawText(textWithNewlines, font, position); string textWithNewlines = "Some text\nSecond line"; pdfDoc.DrawText(textWithNewlines, font, position); Imports Microsoft.VisualBasic Dim textWithNewlines As String = "Some text" & vbLf & "Second line" pdfDoc.DrawText(textWithNewlines, font, position) $vbLabelText $csharpLabel Use Custom Font We also support using custom fonts with the DrawText method; below is an example with the Pixelify Sans Font added for the text. :path=/static-assets/pdf/content-code-examples/how-to/draw-text-and-bitmap-draw-custom-font.cs using IronPdf; using IronSoftware.Drawing; using System.IO; ChromePdfRenderer renderer = new ChromePdfRenderer(); PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>"); // Add custom font to the PDF byte[] fontByte = File.ReadAllBytes(@".\PixelifySans-VariableFont_wght.ttf"); var addedFont = pdf.Fonts.Add(fontByte); // Draw text on PDF pdf.DrawText("Iron Software", addedFont.Name, FontSize: 12, PageIndex: 0, X: 100, Y: 600, Color.Black, Rotation: 0); pdf.SaveAs("drawCustomFont.pdf"); Imports IronPdf Imports IronSoftware.Drawing Imports System.IO Private renderer As New ChromePdfRenderer() Private pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1>testing</h1>") ' Add custom font to the PDF Private fontByte() As Byte = File.ReadAllBytes(".\PixelifySans-VariableFont_wght.ttf") Private addedFont = pdf.Fonts.Add(fontByte) ' Draw text on PDF pdf.DrawText("Iron Software", addedFont.Name, FontSize:= 12, PageIndex:= 0, X:= 100, Y:= 600, Color.Black, Rotation:= 0) pdf.SaveAs("drawCustomFont.pdf") $vbLabelText $csharpLabel Draw Image Example With IronPDF's DrawBitmap method, you can easily add bitmaps to an existing PDF document. This method functions similarly to the Image Stamper feature, allowing you to stamp images onto an existing PDF. Please noteThe DrawBitmap method works best with large images. When attempting to use smaller resolution images, you may encounter the following exception: IronPdf.Exceptions.IronPdfNativeException: 'Error while drawing image: data length (567000) is less than expected (756000)'. To overcome this issue, you can use the Image Stamper, which seamlessly handles images of all sizes. Sample image Code :path=/static-assets/pdf/content-code-examples/how-to/draw-text-and-bitmap-draw-bitmap.cs using IronPdf; using IronSoftware.Drawing; ChromePdfRenderer renderer = new ChromePdfRenderer(); PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>"); // Open the image from file AnyBitmap bitmap = AnyBitmap.FromFile("ironSoftware.png"); // Draw the bitmp on PDF pdf.DrawBitmap(bitmap, 0, 50, 250, 500, 300); pdf.SaveAs("drawImage.pdf"); IRON VB CONVERTER ERROR developers@ironsoftware.com $vbLabelText $csharpLabel Output PDF Ready to see what else you can do? Check out our tutorial page here: Edit PDFs Frequently Asked Questions What is this software used for? IronPDF is used to draw text and images onto existing PDF documents using C# .NET, allowing users to customize PDFs with watermarks, logos, annotations, and more. How can I add text to a PDF using this tool? To add text to a PDF using IronPDF, use the 'DrawText' method of the PdfDocument object, specifying the text, font, and position. What fonts are supported for adding text? IronPDF supports standard fonts such as Courier, Arial (Helvetica), Times New Roman, Symbol, and ZapfDingbats. Custom fonts can also be used. Can I use custom fonts? Yes, IronPDF allows the use of custom fonts by specifying the custom font file when using the 'DrawText' method. How do I add an image to a PDF? To add an image to a PDF using IronPDF, use the 'DrawBitmap' method, providing the image file and the specified position on the PDF. What should I do if I encounter an error with small images? If you encounter errors with small images, consider using the Image Stamper feature of IronPDF, which handles images of all sizes seamlessly. Does this software support text with newlines? Yes, IronPDF supports text with newlines by including newline characters '\n' in the text string when using the 'DrawText' method. How can I start using this tool? To start using IronPDF, download the C# library from NuGet, then follow the steps to import the PDF, add text or images, and export the edited document. Chaknith Bin Chat with engineering team now Software Engineer Chaknith is the Sherlock Holmes of developers. It first occurred to him he might have a future in software engineering, when he was doing code challenges for fun. His focus is on IronXL and IronBarcode, but he takes pride in helping customers with every product. Chaknith leverages his knowledge from talking directly with customers, to help further improve the products themselves. His anecdotal feedback goes beyond Jira tickets and supports product development, documentation and marketing, to improve customer’s overall experience.When he isn’t in the office, he can be found learning about machine learning, coding and hiking. Ready to Get Started? Free NuGet Download Total downloads: 14,631,247 View Licenses