using System; using System.Collections.Generic; using System.Text; using System.Drawing; using it.stefanochizzolini.clown.documents; using it.stefanochizzolini.clown.documents.contents.composition; using it.stefanochizzolini.clown.documents.contents.fonts; using it.stefanochizzolini.clown.files; namespace PDF_Test_App { class Program { static void Main(string[] args) { File file = new File("TestDocument.pdf"); // 2. Get its corresponding document! /* NOTE: a Document object is the high-level (semantic) representation of a PDF file. */ Document document = file.Document; // 3. Add the page to the document! Page page = document.Pages[0]; // 4. Create a content builder for the page! PrimitiveFilter builder = new PrimitiveFilter(page); // 3. Inserting contents ... // Set the font to use! builder.SetFont( new StandardType1Font(document,StandardType1Font.FamilyNameEnum.Courier, false, false), 12 ); // Show the text onto the page! builder.ShowText("This is a test", new PointF(55,266)); // save a new file to disk /* Standard serialization mode is the default, compact way to serialize a PDF file. */ SerializationModeEnum serializationMode = SerializationModeEnum.Standard; file.WriteTo("Result.pdf",serializationMode); } } }