C# and VB.NET Code Samples

Warning

As of 17 August 2022, we’re sunsetting PSPDFKit Library for .NET and replacing it with PSPDFKit GdPicture.NET Library. For more information, see our blog announcement.

Choosing the Appropriate OCR Zone in C#

This example shows how to choose the appropriate OCR context. OCR context is easy to set and use, and it’s important in the OCR process. Often on you…

Converting a Microsoft Word Binary File Document (DOC) to a Microsoft Word OpenXML Document (DOCX) in C#

The GdPicture.NET SDK includes the `GdPictureDocumentConverter` class, which provides many different methods and properties for document conversion o…

Convert PDFs, MS Office & Images to TIFF in C#

The GdPicture.NET SDK includes the `GdpictureDocumentConverter` class, which provides many different methods and properties for document conversion o…

Convert Multipage TIFF to a Multipage JBIG2 in C#

This example shows how to convert a multipage TIFF file to a multipage JBIG2 file.

Converting a Multipage PDF to a Multipage TIFF Using Color Detection in C#

This example shows how to convert an existing PDF document to a multipage TIFF file using the color detection plugin to produce the best quality outp…

Generate a Multipage TIFF File Using a Compression Mode per Page in C#

This example shows how to generate a multipage TIFF file using a specific compression mode per page.

Highlight Region in PDF or Image in C#

This example shows how to draw highlighted regions on top of a document. Highlighted regions are a special feature that’s modifiable by mouse. They c…

Highlight and Crop an Image in C#

This example shows how to create an image from the area defined by a highlighted region located on top of a document displayed within the `GdViewer` …

Merging Two PDF Documents by Alternating Pages from Both Files in C#

This example shows how to merge two PDF documents, alternating a page from the first document and a page from the second document. This can be useful…

Recompress Existing PDF Using MRC Compression in C#

Mixed raster content (MRC) compression is useful for compressing complex PDF documents to reduce their file size. This example shows how to recompres…

Recompress an Existing PDF Using Color Detection in C#

This example shows how to recompress an existing PDF document containing various images from a scanner.

Automatically Rotate Pages of a Multipage TIFF File Using OCR and C#

This example shows how to automatically rotate pages of a multipage TIFF file with help of the OCR Tesseract engine method. After the successful rota…

Saving a Bitonal TIFF with Photometric 0 (White Is 0) & CCITT4 Compression in C#

This example shows how to save a bitonal TIFF document with photometric 1 and CCITT4 compression. Some (buggy) image viewers, such as Windows Picture…

Saving Images into Folders Based on Their Barcode

This example shows how to sort image files and save them as TIFF files in different folders based on the barcode type detected within the image.

Using an External OCR Engine during PDF/OCR Generation

This example shows how to use any external OCR engine during PDF/OCR generation using the `GdPicturePDF` class.

Title Description Languages
Choosing the Appropriate OCR Zone in C# This example shows how to choose the appropriate OCR context. OCR context is easy to set and use, and it’s important in the OCR process. Often on you… C# · VB.NET
Converting a Microsoft Word Binary File Document (DOC) to a Microsoft Word OpenXML Document (DOCX) in C# The GdPicture.NET SDK includes the `GdPictureDocumentConverter` class, which provides many different methods and properties for document conversion o… C#
Convert PDFs, MS Office & Images to TIFF in C# The GdPicture.NET SDK includes the `GdpictureDocumentConverter` class, which provides many different methods and properties for document conversion o… C#
Convert Multipage TIFF to a Multipage JBIG2 in C# This example shows how to convert a multipage TIFF file to a multipage JBIG2 file. C# · VB.NET
Converting a Multipage PDF to a Multipage TIFF Using Color Detection in C# This example shows how to convert an existing PDF document to a multipage TIFF file using the color detection plugin to produce the best quality outp… C# · VB.NET
Generate a Multipage TIFF File Using a Compression Mode per Page in C# This example shows how to generate a multipage TIFF file using a specific compression mode per page. C#
Highlight Region in PDF or Image in C# This example shows how to draw highlighted regions on top of a document. Highlighted regions are a special feature that’s modifiable by mouse. They c… C# · VB.NET
Highlight and Crop an Image in C# This example shows how to create an image from the area defined by a highlighted region located on top of a document displayed within the `GdViewer` … C# · VB.NET
Merging Two PDF Documents by Alternating Pages from Both Files in C# This example shows how to merge two PDF documents, alternating a page from the first document and a page from the second document. This can be useful… C# · VB.NET
Recompress Existing PDF Using MRC Compression in C# Mixed raster content (MRC) compression is useful for compressing complex PDF documents to reduce their file size. This example shows how to recompres… C# · VB.NET
Recompress an Existing PDF Using Color Detection in C# This example shows how to recompress an existing PDF document containing various images from a scanner. C# · VB.NET
Automatically Rotate Pages of a Multipage TIFF File Using OCR and C# This example shows how to automatically rotate pages of a multipage TIFF file with help of the OCR Tesseract engine method. After the successful rota… C# · VB.NET
Saving a Bitonal TIFF with Photometric 0 (White Is 0) & CCITT4 Compression in C# This example shows how to save a bitonal TIFF document with photometric 1 and CCITT4 compression. Some (buggy) image viewers, such as Windows Picture… C# · VB.NET
Saving Images into Folders Based on Their Barcode This example shows how to sort image files and save them as TIFF files in different folders based on the barcode type detected within the image. VB.NET · C#
Using an External OCR Engine during PDF/OCR Generation This example shows how to use any external OCR engine during PDF/OCR generation using the `GdPicturePDF` class. C#