- Open Visual Studio .NET and create a new C# Console Application.
- On the Solution Explorer, right click on the References folder and select "Add reference...".
- Select "DynamicPDF Generator for .NET" from the list on the ".NET" tab and click the "Select" button.
- Select "System.Web.dll" from the list on the ".NET" tab and click the "Select" button (this is needed because the Document.Draw method references it).
- Click the "OK" button to add both references to the project.
- On the Solution Explorer, double click on the "Class1.cs" class to view the code.
- Add the following using directives to the top of the file:
using ceTe.DynamicPDF; using ceTe.DynamicPDF.PageElements;
- Add the following code to the "Main"
method:
Document document = new Document(); Page page = new Page(); page.Elements.Add( new Label( "Hello World!", 0, 0, 100, 12, Font.Helvetica, 12 ) ); document.Pages.Add( page ); document.Draw( "C:\\Temp\\HelloWorld.pdf" );
- Run the project to generate the PDF document. You can view it by navigating to it on your file system.
See Also
My First DynamicPDF Document | DynamicPDF.Generator Assembly

