The PDF SDK for .NET  product has been acquired by Sybrex company in January, 2011 and not available on our web-site anymore.

NEW: Check our new rich PDF reports generator for Javascript (completely client side generation): PDF Generator SDK for Javascriptclick here to read more details...


For 3rd party server side C# open-source PDF generation library?

Check the blog article: .NET Bear, Do You Know Any Free PDF Generation Libraries For Use In Commercial Applications?
 

Our commercial products for PDF format:

PDF Extractor SDK - extract tables, text, structured data from PDF files in your apps

PDF Renderer SDK - render PDF files to PNG, BMP, TIFF images in your apps

PDF To HTML SDK - convert PDF to HTML with images and formatting preserved

How to add text to existing PDF document using Bytescout.PDF library for .NET applications

Add text to the existing PDF document using Bytescout.PDF library for .NET

In this example Bytescout.PDF library for .NET is used to add text to the first page of the existing PDF document (HelloWorld.pdf) and save new document as HelloWorldAgain.pdf

Download example source code: bytescoutpdf_example_add_text_to_existing_document.zip (6 KB)

Source PDF document which is taken as source to modify (add text) and save as new document file

PDF document with text added to the first page

            // Create main PDF Doc Engine
            
PDFDocEngine engine = new PDFDocEngine("""");

            
// Open existing document
            
Document document engine.AddDocument("HelloWorld.pdf");

            
// Get first page
            
Page page document.GetPage(0);

            
// Create new drawing
            
Drawing drawing page.AddDrawing();

            
// Add standard font
            
uint font document.AddFontStandard(StandardFontType.Courier, FontEncodingType.WinAnsi);

            
// Set Active Font
            
drawing.SetActiveFont(font, 50falsefalse);

            
// Draw Text
            
drawing.PlaceText(1001500"Hello again, World!");
            
drawing.PlaceText(1002000"(was added to the existing page)");

            
// Closing drawing on the page
            
drawing.Close();

            
// Save document
            
document.Save("HelloWorldAgain.pdf");

Download example source code: bytescoutpdf_example_add_text_to_existing_document.zip (6 KB)

Filed in: PDF SDK for .NET

Tutorials: