// Create main PDF Doc Engine
PDFDocEngine engine = new PDFDocEngine("", "");
// Add new document
Document document = engine.AddDocument();
// Append new page to the document
Page page = document.AddPage(PageSizeType.A3, PageOrientationType.LandScape);
// Create new drawing
Drawing drawing = page.AddDrawing();
// Add standard font
uint font = document.AddFontStandard(StandardFontType.Courier, FontEncodingType.WinAnsi);
// Set Active Font
drawing.SetActiveFont(font, 50, false, false);
// Draw Text
drawing.PlaceText(100, 100, 0, "Hello World!");
// Closing drawing on the page
drawing.Close();
// clear http output
Response.Clear();
// set the content type to PDF
Response.ContentType = "application/pdf";
// add content type header
Response.AddHeader("Content-Type", "application/pdf");
// set the content disposition
Response.AddHeader("Content-Disposition", "inline;filename=HelloWorld.pdf");
// write the buffer with pdf file to the output
document.Save(Response.OutputStream);
Response.End();