[C#]
PdfDocumentBuilder builder = new PdfDocumentBuilder();
IPdfDocument pdfDoc = builder.CreateDocument();
IPdfPage page = pdfDoc.Pages.AddNew();
IPdfGraphics g = page.Graphics;
IPdfBrush b = PdfBrushFactory.Black;
IPdfFont f = builder.FontFactory.CreateStandardFont(PdfStandardFontFamilies.Helvetica, 20f);
for (int i = 0; i < 100; i++)
g.DrawString("Hello world!", f, b, new PointF(20, 20 * i));
if (System.IO.File.Exists(fileName))
System.IO.File.Delete(fileName);
pdfDoc.Save(fileName);
Dim builder As New PdfDocumentBuilder()
Dim pdfDoc As IPdfDocument = builder.CreateDocument()
Dim page As IPdfPage = pdfDoc.Pages.AddNew()
Dim g As IPdfGraphics = page.Graphics
Dim b As IPdfBrush = PdfBrushFactory.Black
Dim f As IPdfFont = builder.FontFactory.CreateStandardFont(PdfStandardFontFamilies.Helvetica, 20.0F)
For i As Integer = 0 To 99
g.DrawString("Hello world!", f, b, New PointF(20, 20 * i))
Next
If System.IO.File.Exists(fileName) Then
System.IO.File.Delete(fileName)
End If
pdfDoc.Save(fileName)