Guide for C#
Core Document Formats
Additional Features

C# PDF - Print PDF Document in C#.NET

PDF Document Printer API SDK for Visual C# .NET Class Applications

Visual C#
Home > .NET Imaging SDK > C# > Print PDF
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

RasterEdge PDF document printing library control SDK is a standalone and easy-to-use API which allows C# developers to send a source PDF document file to an actual physical printer device from any .NET web server-based or Windows Forms application. Therefore, this C#.NET PDF document printer API SDK can successfully automate target PDF document file printing.
Apart from the basic PDF document printing function, RasterEdge Visual C# .NET PDF document printer library toolkit also owns other printing options, like number of copies, PDF document printing orientation, PDF document printing paper size and PDF document printing resolution.
Thus, using this professional and fully-featured PDF document printing SDK, .NET developers can easily create a custom web-based client-server printing application or a custom Windows Forms project that owns both common and advanced PDF document printing features.
In general, besides integrating intelligent PDF document printing functions, a modern Visual C# .NET PDF document management application should also own other advanced PDF document processing features. For example, before you print the source PDF document, do you need to add watermarks to target PDF document file using C# code? Do you need to add customized barcode images to target PDF document with the purpose of getting a better file tracking and management?
In order to have a comprehensive insight of RasterEdge C#.NET PDF document printer control SDK, we divide this online tutorial page into following five sections.
  • Feature list of C#.NET PDF document printing API
  • How to print PDF document in C#.NET class application
  • C# .NET method for PDF document printing
  • C# programming example to illustrate PDF document printing in .NET
  • C#.NET PDF document printer SDK FAQs
C# PDF Document Printer Add-on Features
  • Standalone C#.NET PDF document printing API, independent from any other PDF-related APIs
  • Quickly print all pages or one specified page from source PDF document using C# programming code
  • Support common advanced PDF document printing features, like printing orientation and resolution
Print PDF Document Using C#.NET
Here we provide you guidance on how to use RasterEdge C# .NET PDF document printing add-on for high-quality and fast PDF file printing.
  1. Make sure you have installed Visual Studio 2005 (or above versions) and .NET Framework 2.0 (or greater versions);
  2. Add following dlls from C#.NET PDF document printer SDK to your C# project references;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.PDF.dll
  3. Get evaluation license key of RasterEdge DocImage SDK for .NET and place it in the bin folder where above integrated dlls are located;
  4. You can print PDF document using the demo C# code we has offered below.
C# Method to Print PDF Document
RasterEdge offers two methods for printing PDF document in different situations. One is used to print all source PDF document pages using C#.NET. The other is used to print one specified PDF document page in C#.NET project.

Method for All PDF Pages Printing

public void PdfProcessorPrint(string PDFInputFile, String Printer);

Method for One Defined PDF Page Printing

public void PdfProcessorPrint(string PDFInputFile, int PDFPageNumberStart, int PDFPageNumberStop, string Printer);
Sample C# Code to Print PDF File
Accordingly, there are two different C# code demos for PDF document printing in C#.NET class application.

Print All PDF Pages Using C# Code

using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;

RasterEdgeImaging PDF = new RasterEdgeImaging();

public void PdfProcessorPrint();
{
PDFInputFile = (@"C:/1.pdf");
Printer = (@"C:/HP Color LaserJet 5550 PCL 6");
};
PDF. PdfProcessorPrint(@"C:/1.pdf", @"C:/HP Color LaserJet 5550 PCL 6");

Print One Certain PDF Page Using C# Code

using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;

RasterEdgeImaging PDF = new RasterEdgeImaging();

public void PdfProcessorPrint();
{
PDFInputFile = (@"C:/1.pdf");
PDFPageNumberStart = "0";
PDFPageNumberStop = "4";
Printer = (@"C:/ HP Color LaserJet 5550 PCL 6");
};
PDF. PdfProcessorPrint(@"C:/1.pdf", "0","4", @"C:/ HP Color LaserJet 5550 PCL 6");
C# PDF Document Printing FAQs
Q 1: Does RasterEdge C#.NET PDF document printer SDK support printing multiple PDF documents at a time?
A 1: Sorry, currently, our C#.NET PDF document printer SDK can only be used to print one single PDF document at a time. It does not yet support printing PDF document files in batch mode.

Q 2: Can I select a page range from source PDF document and print all selected PDF document pages using RasterEdge C#.NET PDF document printer SDK?
A 2: Sorry, the current version of C#.NET PDF document printer SDK only allows developers to select one page for PDF document printing, not available for a range of pages printing.
More Tutorials!
Find more user guides with RasteEdge .NET Image SDK using Visual C# sample codings!


Recommend this to Google+