This project is read-only.
Project Description
silverPDF is a Silverlight library that makes it easier for developers to create PDF files on the client side.

silverPDF is sponsored by Aleyant Systems (

silverPDF is based on two excellent open source projects: PdfSharp ( and iTextSharp (

void GenerateAndSavePDF_Button_Click(object sender, RoutedEventArgs e)
    SaveFileDialog d = new SaveFileDialog();
    d.Filter = "PDF file format|*.pdf";

    // Save the document...
    if (d.ShowDialog() == true)
         // Create a new PDF document
         PdfDocument document = new PdfDocument();

         // Create an empty page
         PdfPage page = document.AddPage();

         // Get an XGraphics object for drawing
         XGraphics gfx = XGraphics.FromPdfPage(page);

         XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);

         // Create a font
         XFont font = new XFont("Huxtable", 20, XFontStyle.Bold, options);

         // Draw the text
         gfx.DrawString(text1.Text, font, XBrushes.Black,
             new XRect(0, 0, page.Width, page.Height),


Last edited Jul 12, 2010 at 10:30 AM by Ai_boy, version 11