Guide for C#
Core Document Formats
Additional Features

C# PDF - PDF Creating in C#.NET

Professional Visual C# .NET PDF Document Creator Library SDK

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

C#.NET PDF document file creating library control from RasterEdge DocImage SDK for .NET is a robust & thread-safe .NET solution which provides a reliable and quick approach for C# developers to create a highly-secure and industry-standard PDF document file. The PDF document file created by RasterEdge C# PDF document creator library is searchable and can be fully populated with editable text and graphics programmatically.
This Visual C# .NET PDF document creation control toolkit can not only allow developers to generate an empty standard PDF document file but also offer them the ability to define the page numbers of generated PDF document by simple C# programming code. As this PDF document creator library is built in .NET Framework 2.0 and designed specifically for .NET applications, C# developers can easily use this professional PDF document generating SDK in all .NET developing applications, including ASP.NET web services and Windows Forms application.
After you create a PDF document in C#.NET using this PDF document creating toolkit, you may need to add some text and draw some graphics on created PDF document file. Then you can try this C#.NET PDF document drawing library control. Besides, using this PDF document metadata adding control, you can add some additional information to generated PDF file. What's more, you can also protect created PDF file by adding watermarks on PDF using C# code.
Now, please look at the article layout of this C#.NET PDF document creating & generating tutorial page.
  • Feature list of RasterEdge Visual C# .NET PDF creator control
  • How to create an empty PDF document in C#.NET class application
  • C#.NET method to create PDF document file
  • Sample C# code for new PDF document generation in .NET
  • C#.NET PDF document generation FAQs
C# PDF Document Creator Control Overview
  1. Standalone .NET solution that creates PDF file without using any external software on either developer or client machines
  2. Quickly create a standard and searchable PDF document with desired page numbers using C# code
  3. Free to set the name and outputting path of created PDF document in C#.NET class application
Create PDF Document Using C#.NET
In this part, we offer step-by-step guidance on how to create a new PDF document in C#.NET class application using our PDF document generating SDK.
  1. Create a C#.NET class project in Microsoft Visual Studio (2005 or later versions);
  2. Install .NET Framework 2.0 or above versions;
  3. Download and unzip trial version of RasterEdge DocImage SDK for .NET;
  4. Find and embed following dlls from C#.NET PDF document creating and generating SDK to your C# project references;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.PDF.dll
  5. Run the RasterEdge.Imaging License Manager.exe to get evaluation license key;
  6. Copy created "RasterEdgeLicense.txt" to the folder where above integrated C#.NET PDF document file creator dlls are located;
  7. Create a new PDF file with following sample C# code.
C# Method to Create PDF File in .NET
The method that RasterEdge C#.NET PDF document creating library has adopted can help developers generate and save a high-quality PDF document file using three lines of C# code.
public static void SaveDocumentFile(REDocument document, string filePath);
public static void SaveDocumentFile(BaseImage image, string filePath, BaseEncoder enc);
public static void SaveDocumentFile(List<BaseImage> images, string filePath, BaseEncoder enc);
public static void SaveDocumentFile(REDocument document, string filePath, BaseEncoder enc);
Demo C# Code for PDF File Creation
The sample C# code will demonstrate how to create a new PDF document file with user-defined pages and save it to local file.
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;


namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName = FolderName + "SampleNew.pdf";

PDFDocument pdf = new PDFDocument(5);

REFile.SaveDocumentFile(pdf, fileName, new PDFEncoder());//save new pdf

}

}
}
C# PDF Document Creating FAQs
Q: Can I use your C#.NET PDF document creator add-on to generate a standard PDF document with text content?
A: Sorry, RasterEdge PDF document creator add-on can only be used to create an empty PDF document file. But if coupled with other RasterEdge PDF document processing libraries, like PDF document drawing control, this PDF document creating add-on can meet your request quite easily.
More Tutorials!
Find more user guides with RasteEdge .NET Image SDK using Visual C# sample codings!


Recommend this to Google+