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.
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.