• Download Trial
  • Purchase
  • Contact Us
  • Login

ProductsGreat pdf developer solutions
  •  
  • PDFNet SDK
  • PDF2Image
  • PDF2Text
  • XPSConvert
  • PDF2XPS
  • PDF2SVG
  • PDF PageMaster
  • PDF/A Manager
  • PDFSecure
  • PDF CosEdit
SupportDeveloper 2 developer support
  •  
  • Annual Maintenance Subscription
  • Technical Support & Resources
  • Professional Services
  • Support FAQ
ResourcesCommunity & developer resources
  •  
  • PDFTron Labs
  • Standards
  • PDF & Environment
  • Industry News
  • Newsletter
  • Whitepapers/Datasheets
Why PDFTronTrusted pdf experts with great solutions
  •  
  • Benefits
  • Our Customers
  • Testimonials
About UsThe story behind the company
  • News & Press
  • Contact Us
  • Careers
  • CO-OP &
    Internship Opportunities
  • Partners/Alliances
  • Resellers

Home // Products // PDFNet SDK // Sample Code

  • Products
  • PDFNet SDK
  • Overview
  • Benefits
  • Features
  • Mobile SDK
  • Support
  • What's New
  • FAQ
  • Documentation
  • Knowledge Base
  • API Reference
  • Javadocs
  • Sample Code
  • Forum
  • Download Trial
  • PDF2Image
  • PDF2Text
  • XPSConvert
  • PDF2XPS
  • PDF2SVG
  • PDF PageMaster
  • PDF/A Manager
  • PDFSecure
  • PDF CosEdit
Sub Navigation

Browse by Functionality

PDFNet SDK

Sample Code

  • Alphabetically |
  • Functionality


+PDF Creation
  • Annotation

    Shows how to add and a text annotation to an existing page and how to create link annotations between several pages:

    C#, Java, VB.Net, C++

  • AddImage

    This sample illustrates how to embed various raster image formats (e.g. TIFF, JPEG, JPEG2000, JBIG2, GIF, PNG, BMP, etc.) in a PDF document.

    C#, Java, VB.Net, C++
  • Bookmark

    The sample code illustrates how to read and edit existing outline items and create new bookmarks using the high-level API .

    C#, Java, VB.Net, C++
  • EncTest

    Illustrates encryption support in PDFNet. The sample code reads an encrypted document and sets a new SecurityHandler.

    C#, Java, VB.Net, C++
  • ElementBuilder

    Illustrates how to use PDFNet page writing API, how to embed fonts and images and how to copy graphical elements from one page to another.

    C#, Java, VB.Net, C++
  • InteractiveForms

    The sample illustrates some basic PDFNet capabilities related to interactive forms (also known as AcroForms).

    C#, Java, VB.Net, C++

  • PageLabels

    This example illustrates how to work with PDF page labels. PDF page labels can be used to describe a page. This is used to allow for non-sequential page numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the beginning of a book).

    C#, Java, VB.Net, C++

  • Pattern

    This example illustrates how to create various PDF patterns and shadings.

    C#, Java, VB.Net, C++

  • PDFLayers

    This sample demonstrates how to create PDF layers (also known as Optional Content Groups - OCGs). The sample also shows how to extract and render PDF layers.

    C#, Java, VB.Net, C++

  • PDFDocMemory

    The sample illustrates how to read/write a PDF document from/to memory buffer. This is useful for applications that work with dynamic PDFdocuments that don't need to be saved/read from a disk.

    C#, Java, VB.Net, C++

  • U3D

    This example illustrates how to embed U3D content (3 dimensional models) in PDF.

    C#, Java, VB.Net, C++

  • UnicodeWrite

    An example illustrating how to create Unicode text and how to embed composite fonts.

    C#, Java, VB.Net, C++

  • Xaml2Pdf

    This example shows how to dynamically generate PDF or XPS from a FlowDocument, XAML, or WPF. Although converting FlowDocument or XAML to PDF is one of the simplest ways to dynamically generate PDF from .NET, it is also very flexible in terms of how content is paginated and flowed into a fixed document such as PDF or XPS. An alternative way to dynamically generate PDF is using low-level objects such as ElementBuilder and ElementWriter which offers even more flexibility and output control.

    C#

+PDF Editing
  • Annotation

    Shows how to add and a text annotation to an existing page and how to create link annotations between several pages:

    C#, Java, VB.Net, C++

  • Bookmark

    The sample code illustrates how to read and edit existing outline items and create new bookmarks using the high-level API .

    C#, Java, VB.Net, C++
  • EncTest

    Illustrates encryption support in PDFNet. The sample code reads an encrypted document and sets a new SecurityHandler.

    C#, Java, VB.Net, C++
  • ElementEdit

    The sample code shows how to edit the page display list and how to modify graphics state attributes on existing Elements. In particular the sample program strips all images from the page and changes text color to blue.

    C#, Java, VB.Net, C++
  • ImpositionTest

    The sample illustrates how multiple pages can be combined/imposed using PDFNet. Page imposition can be used to arrange/order pages prior to printing or to assemble a 'master' page from several 'source' pages. Using PDFNet API it is possible to write applications that can re-order the pages such that they will display in the correct order when the hard copy pages are compiled and folded correctly.

    C#, Java, VB.Net, C++

  • InteractiveForms

    The sample illustrates some basic PDFNet capabilities related to interactive forms (also known as AcroForms).

    C#, Java, VB.Net, C++

  • JBIGTest

    The sample project illustrates how to recompress bi-tonal (black and white) images in existing PDF documents using JBIG2 compression. The sample is intended to show how to specify hint information for image encoder and is not meant to be a generic PDF optimization tool. PDFNet supports both loss-less and lossy JBIG2 compression. To give you a feeling of compression rates possible with PDFNet we re-compressed a document containing 17 scanned pages. The original input document is ~1.4MB and is using standard CCITT Fax compression. Loss-less JBIG2 compression shrunk down the file to 641KB. Lossy JBIG2 compression shrunk down the file to 176KB.

    C#, Java, VB.Net, C++

  • PageLabels

    This example illustrates how to work with PDF page labels. PDF page labels can be used to describe a page. This is used to allow for non-sequential page numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the beginning of a book).

    C#, Java, VB.Net, C++

  • PDFLayers

    This sample demonstrates how to create PDF layers (also known as Optional Content Groups - OCGs). The sample also shows how to extract and render PDF layers.

    C#, Java, VB.Net, C++

  • PDFDocMemory

    The sample illustrates how to read/write a PDF document from/to memory buffer. This is useful for applications that work with dynamic PDFdocuments that don't need to be saved/read from a disk.

    C#, Java, VB.Net, C++

+PDF Printing
  • PDFPrint

    This sample illustrates how to print PDF document using currently selected default printer. It is possible to use PDFNet printing functionality in both client and server applications without dependance on any third party components.

    C#, Java, VB.Net, C++

  • PDFView

    This sample shows how to customize the viewer control by implementing
    a number of custom tools (such as freehand tool, link creation tool,
    rectangular zoom etc) and custom GUI elements (such as custom navigation
    and printing). For a more introductory example of how to use PDFViewCtrl,
    please see PDFViewSimple sample project.

    C#, Java, VB.Net, C++

+PDF Stamping
  • ElementBuilder

    Illustrates how to use PDFNet page writing API, how to embed fonts and images and how to copy graphical elements from one page to another.

    C#, Java, VB.Net, C++
+PDF Viewing
  • PDFViewSimple

    This sample shows how to use PDF viewer control in a basic
    project. The sample uses a number of built-in features from PDFViewCtrl
    to implement document navigation, text highlighting, markup, and
    editing. If you are looking for a sample showing how to further
    customize the viewer (e.g. by implementing custom tools or custom
    GUI elements), please take a look at PDFView sample project.

    C#, Java, VB.Net

  • PDFView

    This sample shows how to customize the viewer control by implementing
    a number of custom tools (such as freehand tool, link creation tool,
    rectangular zoom etc) and custom GUI elements (such as custom navigation
    and printing). For a more introductory example of how to use PDFViewCtrl,
    please see PDFViewSimple sample project.

    C#, Java, VB.Net, C++

+PDF Rasterization (PDF to Image Conversion)
  • PDFDraw

    This sample illustrates how to use the built-in rasterizer in order to render PDF images on the fly and how to save resulting images in PNG and JPEG format.

    C#, Java, VB.Net, C++

+PDF Text Extraction
  • TextExtract

    The sample illustrates the basic text extraction capabilities of PDFNet.

    C#, Java, VB.Net, C++

+PDF Forms
  • InteractiveForms

    The sample illustrates some basic PDFNet capabilities related to interactive forms (also known as AcroForms).

    C#, Java, VB.Net, C++

  • FDF

    PDFNet includes a full support for FDF (Forms Data Format) and capability to merge/extract forms data (FDF) with/from PDF. The sample illustrates basic FDF merge/extract functionality available in PDFNet.

    C#, Java, VB.Net, C++

+PDF Annotation Processing
  • Annotation

    Shows how to add and a text annotation to an existing page and how to create link annotations between several pages:

    C#, Java, VB.Net, C++

  • U3D

    This example illustrates how to embed U3D content (3 dimensional models) in PDF.

    C#, Java, VB.Net, C++

+PDF Page Manipulation (Spilt & Merge)
  • PDFPage

    The sample illustrates how to copy pages from one document to another, how to delete, and re-arrange pages and how to use ImportPages() method for very efficient copy and merge operations.

    C#, Java, VB.Net, C++

  • ImpositionTest

    The sample illustrates how multiple pages can be combined/imposed using PDFNet. Page imposition can be used to arrange/order pages prior to printing or to assemble a 'master' page from several 'source' pages. Using PDFNet API it is possible to write applications that can re-order the pages such that they will display in the correct order when the hard copy pages are compiled and folded correctly.

    C#, Java, VB.Net, C++

  • Rect

    Shows how to change Page's MediaBox using Rect class.

    C#, Java, VB.Net, C++

+PDF Bookmarks Processing
  • Bookmark

    The sample code illustrates how to read and edit existing outline items and create new bookmarks using the high-level API .

    C#, Java, VB.Net, C++
+PDF Content Extraction
  • Annotation

    Shows how to add and a text annotation to an existing page and how to create link annotations between several pages:

    C#, Java, VB.Net, C++

  • Bookmark

    The sample code illustrates how to read and edit existing outline items and create new bookmarks using the high-level API .

    C#, Java, VB.Net, C++
  • ElementReader

    Illustrates how to traverse page display list using ElementReader.

    C#, Java VB.Net, C++
  • ElementReaderAdv

    The sample shows how to use some of more advanced PDFNet features. The sample code illustrates how to extract text, paths, and images. The sample also shows how to do color conversion, image normalization, and how to process changes in the graphics state.

    C#, Java, VB.Net, C++
  • ImageExtractTest

    This sample illustrates couple of approaches to PDF image extraction.

    C#, Java, VB.Net, C++

  • InteractiveForms

    The sample illustrates some basic PDFNet capabilities related to interactive forms (also known as AcroForms).

    C#, Java, VB.Net, C++

  • LogicalStructure

    This sample explores the structure and content of a tagged PDF document and dumps the structure information to the console window.

    C#, Java, VB.Net, C++

  • PageLabels

    This example illustrates how to work with PDF page labels. PDF page labels can be used to describe a page. This is used to allow for non-sequential page numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the beginning of a book).

    C#, Java, VB.Net, C++

  • PDFDraw

    This sample illustrates how to use the built-in rasterizer in order to render PDF images on the fly and how to save resulting images in PNG and JPEG format.

    C#, Java, VB.Net, C++

  • PDFLayers

    This sample demonstrates how to create PDF layers (also known as Optional Content Groups - OCGs). The sample also shows how to extract and render PDF layers.

    C#, Java, VB.Net, C++

  • TextExtract

    The sample illustrates the basic text extraction capabilities of PDFNet.

    C#, Java, VB.Net, C++

+PDF Low-level Editing
  • SDF

    The sample illustrates how to use basic Cos/SDF API to edit an existing document.

    C#, Java, VB.Net, C++

+PDF Security
  • EncTest

    Illustrates encryption support in PDFNet. The sample code reads an encrypted document and sets a new SecurityHandler.

    C#, Java, VB.Net, C++
+PDF/A Conversion and Validation
  • PDF/A

    This sample illustrates how to use PDFACompliance class to validate
    existing PDF documents for PDF/A compliance as well as to convert
    generic PDF documents to PDF/A format.

    C#, Java, VB.Net, C++

Next Steps:
  • Download Trial
  • Purchase

See Licensing Options

Sub Navigation
  • 2009 PDFTRON SYSTEMS, INC, ALL RIGHTS RESERVED |
  • LEGAL |
  • SITEMAP |
  • CAREERS |
  • CONTACT US