locked
how to write data in to pdf using c# RRS feed

  • Question

  • User-1226353825 posted

    how want write data "xzzxzxzc" in to pdf using c# based on the font i give...

    and the font i have to take from server....

    alredy tried with pdfsharp....but am unaware how to take the font from server...or from a given path

    PdfDocument document = new PdfDocument();
                document.Info.Title = "Barcodes";
    
                // Create an empty page
                PdfPage page = document.AddPage();
    
                // Get an XGraphics object for drawing
                XGraphics gfx = XGraphics.FromPdfPage(page);
    
                // Create a font
                XFont font = new XFont("IDAutomationHC39M", 6);
               
                // Draw the text
                gfx.DrawString("Hello, World!", font, XBrushes.Black,
                  new XRect(0, 0, page.Width, page.Height),
                  XStringFormats.Center);

    Friday, March 4, 2011 1:46 AM

All replies