English | 日本
.NET PDF
Shopping Cart Contact Us NET PDF
PDF NET
.NET PDF

How to create PDF .NET Apps in a few steps:

  1. Download easy PDF SDK for .NET..
  2. Select your .NET language (C#, VB.NET net, C++ etc).
  3. Select the features you want in your PDF.
  4. Select the features you want in your PDF.
  5. Or download a sample .NET PDF App to test out your code.
  6. Optionally: select the type of document you want to convert to PDF. This will get you the best PDF and optimized code.

Here’s how you can add PDF Functionalities to your ASP.NET Web Server Applications Easily

If you want to write your own code, a few lines of VB.NET or C# code are all it takes to get started to convert a document to PDF in your ASP.NET application:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oPrinter As Printer = oLoader.LoadObject("easyPDF.Printer.8")

Dim oPrintJob As PrintJob = oPrinter.PrintJob

oPrintJob.PrintOut(Server.MapPath("./input.doc"), Server.MapPath("./output.pdf"))
...

How to use Comprehensive PDF API Features in ASP.NET

BCL easy PDF SDK comes with all the PDF features that you may need in developing enterprise ASP and ASP.NET web server applications:

  • Create PDF in NET
  • Process PDF in NET
  • Rasterize PDF in NET
  • PDF Form in NET

How to create PDF in ASP.NET Server Application

Here is an ASP .NET Code Snippet for PDF Server App:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oPrinter As Printer = oLoader.LoadObject("easyPDF.Printer.8")

Dim oPrintJob As PrintJob = oPrinter.PrintJob

oPrintJob.PrintOut(Server.MapPath("./input.doc"), Server.MapPath("./output.pdf"))
...
                  

How to Prepare Your Server PDF .NET APP:

  • Step 1: Complete your Loader Setup
    The Loader Object is a helper object to enable easy PDF SDK on the server-side environment. It eliminates many of the server-side configurations that you would otherwise have to deal with.
  • Step 2: Complete your Microsoft Office Setup
    This example shows how to make Microsoft Word ready for server use. All you need to do here is to make sure that there are no pop-up dialogs from Office products during PDF conversion.
  • Step 3: Complete your COM Security Setup
    Set up your Com Security to make the easy PDF SDK objects run properly on the server-side environment.


How to write C# Programs to Process and Manipulate PDF in .C# (Merging PDFs, Splitting PDF, Extracting Text from PDF, etc)

  • Step 1: Complete your Loader Setup
    This object lets you do post-processing of existing PDF files such as merging multiple PDF files into one, splitting one PDF file into two, and encrypting/decrypting a PDF file.

Here is a .NET Code Snippet for Merging PDF Files:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oProcessor As PDFProcessor = oLoader.LoadObject("easyPDF.PDFProcessor.7")

'merge two files using Merge
oProcessor.Merge(Server.MapPath("./input1.pdf"), Server.MapPath("./input2.pdf"), Server.MapPath("./merged.pdf"))

'merge more than two files using MergeBatch
Dim inputFiles(0 To 2) As String
inputFiles(0) = Server.MapPath("./input1.pdf")
inputFiles(1) = Server.MapPath("./input2.pdf")
inputFiles(2) = Server.MapPath("./input3.pdf")
oProcessor.MergeBatch(inputFiles, Server.MapPath("./merged.pdf"))
...              

 

ere is a .NET Code Snippet for Splitting PDF:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oProcessor As PDFProcessor = oLoader.LoadObject("easyPDF.PDFProcessor.7")

'split the document at page 3
oProcessor.Split(Server.MapPath(".\input.pdf"), Server.MapPath("./part1.pdf"), Server.MapPath("./part2.pdf"), 3)
...
                  

 

Here is a Code Snippet for Extracting Text from PDF:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oProcessor As PDFProcessor = oLoader.LoadObject("easyPDF.PDFProcessor.7")

'extract text from pages 1 through 4 to a physical file using ExtractText
oProcessor.ExtractText(Server.MapPath("./input.pdf"), Server.MapPath("./extracted.txt"), Nothing, 0, 3, Nothing, Nothing)

'extract text from a bounding box on page 1 to a string variable using ExtractText2
Dim text As String = oProcessor.ExtractText2(Server.MapPath("./input.pdf"), 0, 0, 0, 300, 300, Nothing)
... 
                  

 

Here’s how to Rasterize PDF in ASP.NET

Here is a .NET Code Snippet for Rasterizing your PDF:

...
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oConverter As PDFConverter = oLoader.LoadObject("easyPDF.PDFConverter.8")

Dim oPDF2Image As PDF2Image = oConverter.PDF2Image

oPDF2Image.Convert(Server.MapPath("./input.pdf"), Server.MapPath("./output.jpg"), Nothing, Nothing, Nothing)
...
                  

How to Process PDF Form Fields in ASP.NET:

Here is a .NET Code Snippet to process PDF Form Fields:

Download the input.pdf form (line 26 below)

// this example takes the first two fields in a PDF template
// which are Name and Address, and populates them with 
// values of "BCL Technologies" and "Santa Clara, CA"
 
Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.8")

Dim oDocument As PDFDocument = oLoader.LoadObject("easyPDF.PDFDocument.7")

oDocument.Open(Server.MapPath("./input.pdf"))

'get all form fields from the PDF
Dim oFormFields As FormFields = oDocument.FormFields

'get the first form field
Dim oFormField As FormField = oFormFields.Item(0)

Dim oTextField As TextField

If oFormField.Type = docFormFieldType.DOC_FRMTYPE_TEXT And oFormField.Name = "Name" Then
  'set Name to "BCL Technologies"
  oTextField = oFormField
  oTextField.Value = "BCL Technologies"
End If

'get the second form field
oFormField = oFormFields.Item(1)

If oFormField.Type = docFormFieldType.DOC_FRMTYPE_TEXT And oFormField.Name = "Address" Then
  'set Address to "Santa Clara, CA"
  oTextField = oFormField
  oTextField.Value = "Santa Clara, CA"
End If

oDocument.SaveAs(Server.MapPath("./output.pdf"))
                  

 

Download Free Trial

Request Pricing

Read Documentation
Complete PDF Features
  • easy PDF SDK setup was very straightforward, unlike our experience with other products. We wrote just a few lines of code to start using it.” Read the case study
  • “We evaluated many PDF tools and drivers. We even wrote our own. Except for BCL’s easy PDF SDK, all had limitations we couldn’t live with. Some only converted from MS Office and not very well. Others could not do annotation or text stamping on PDF documents. None were as easy to use and as easy to integrate.” Read the case study
 
© 1993 - , BCL Technologies.
All other trademarks are the property of their respective owners.