Would you like to react to this message? Create an account in a few clicks or log in to continue.

    .NET PDF

    avatar
    Admin
    Admin


    Posts : 77
    Join date : 2009-07-28

    .NET PDF Empty .NET PDF

    Post  Admin Sat Jul 31, 2010 5:43 am

    1) Download the library: PDFsharp download page I downloaded: PDFSharp-MigraDocFoundation-1_30.zip
    2) Add the "PdfSharp.csproj" to your solution
    3) Add a reference to PdfSharp inside your application
    4) Call the print pdf class:

    C# Syntax (Toggle Plain Text)

    1.
    PdfSharp.Pdf.Printing.PdfFilePrinter pdoc = new PdfSharp.Pdf.Printing.PdfFilePrinter(fName);
    2.
    PdfSharp.Pdf.Printing.PdfFilePrinter.AdobeReaderPath = @"C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe";
    3.
    PdfSharp.Pdf.Printing.PdfFilePrinter.DefaultPrinterName = "Samsung ML-1740 Series";
    4.
    pdoc.Print();

    PdfSharp.Pdf.Printing.PdfFilePrinter pdoc = new PdfSharp.Pdf.Printing.PdfFilePrinter(fName); PdfSharp.Pdf.Printing.PdfFilePrinter.AdobeReaderPath = @"C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"; PdfSharp.Pdf.Printing.PdfFilePrinter.DefaultPrinterName = "Samsung ML-1740 Series"; pdoc.Print();

    The library does a lot more than print, but I wanted to check it out and since it worked, I figured I would pass it along. It also contains many C# examples of manipulating PDF documents.

      Current date/time is Mon May 20, 2024 8:56 am