Any chance you could take the NEW-PDF.ps1 example and add the XTextFormatter call and publish?
Code:
param($text="Hello World",$fileName="c:\test.pdf")
[reflection.assembly]::loadfrom("C:\downloads\pdfsharp\PDFsharp\code\PdfSharp\bin\Debug\PdfSharp.dll") | out-null
# Create a new PDF document
$document = new-object PdfSharp.Pdf.PdfDocument
# Create an empty page
$page = $document.AddPage()
# Get an XGraphics object for drawing
$gfx = [PdfSharp.Drawing.XGraphics]::FromPdfPage($page)
$options = new-object PdfSharp.Drawing.XPdfFontOptions([PdfSharp.Pdf.PdfFontEncoding]"Unicode", [PdfSharp.Pdf.PdfFontEmbedding]"Always")
# Create a font
$font = new-object PdfSharp.Drawing.XFont("Arial", 20, [PdfSharp.Drawing.XFontStyle]"Bold", $options)
# Draw the text
$gfx.DrawString(
$text,
$font,
[PdfSharp.Drawing.XBrushes]::Black,
(new-object PdfSharp.Drawing.XRect(0, 0, $page.Width, $page.Height) ),
[PdfSharp.Drawing.XStringFormats]::Center)
# Save the document...
$document.Save( $filename )