---
title: "C# any image to PDF: Convert any image to PDF | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/conversion/any-image-to-pdf/"
md_url: "https://www.nutrient.io/guides/dotnet/conversion/any-image-to-pdf.md"
last_updated: "2026-05-21T17:12:02.199Z"
description: "Discover how to convert various image formats to PDF. Step-by-step guides for TIFF, JPG, PNG, BMP, SVG, and more."
---

# Convert any image to PDF in C#

### Overview

[Overview](https://www.nutrient.io/guides/dotnet/conversion/image-to-pdf.md)

### TIFF to PDF

[TIFF to PDF](https://www.nutrient.io/guides/dotnet/conversion/tiff-to-pdf.md)

### JPG to PDF

[JPG to PDF](https://www.nutrient.io/guides/dotnet/conversion/jpg-to-pdf.md)

### PNG to PDF

[PNG to PDF](https://www.nutrient.io/guides/dotnet/conversion/png-to-pdf.md)

### BMP to PDF

[BMP to PDF](https://www.nutrient.io/guides/dotnet/conversion/bmp-to-pdf.md)

### SVG to PDF

[SVG to PDF](https://www.nutrient.io/guides/dotnet/conversion/svg-to-pdf.md)

### Any Image to PDF

[Any Image to PDF](https://www.nutrient.io/guides/dotnet/conversion/any-image-to-pdf.md)

This article explains how to convert any image file to PDF. This article uses RAW files as an example. For more information, see the [list of supported file types](https://www.nutrient.io/guides/dotnet/about/file-type-support.md).

You’ll learn how to convert the image to a PDF document without optical character recognition (OCR). This means that the text in the image isn’t recognized, and you cannot search in the output PDF file. For more information, see the [guide on converting images to searchable PDFs](https://www.nutrient.io/guides/dotnet/ocr/usage/image-to-searchable-pdf.md).

For more information on using mixed raster content (MRC) compression during the conversion, see the [guide on hypercompression](https://www.nutrient.io/guides/dotnet/optimization/hyper-compress-mrc.md).




## Creating a PDF from a RAW file

To create a PDF from a RAW file, follow the steps below:

1. Create a `GdPictureDocumentConverter` object.

2. Load the source document by passing its path to the `LoadFromFile` method. Recommended: Specify the source document format with a member of the `DocumentFormat` enumeration.

3. Save the output in a new PDF document with the `SaveAsPDF` method.

The example below creates a PDF document from a RAW file:

### C#

```csharp

using GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter();
// Load the source document.
gdpictureDocumentConverter.LoadFromFile(@"C:\temp\source.raw", GdPicture14.DocumentFormat.DocumentFormatRAW);
// Save the output in a new PDF document.
gdpictureDocumentConverter.SaveAsPDF(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpictureDocumentConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()
    ' Load the source document.
    gdpictureDocumentConverter.LoadFromFile("C:\temp\source.raw", GdPicture14.DocumentFormat.DocumentFormatRAW)
    ' Save the output in a new PDF document.
    gdpictureDocumentConverter.SaveAsPDF("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`DocumentFormat`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.DocumentFormat.html)

- [`LoadFromFile`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~LoadFromFile.html)

- [`SaveAsPDF`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~SaveAsPDF.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Optional PDF configuration properties

Optionally, configure the conversion with the following properties of the `GdPictureDocumentConverter` object:

- [`PdfBitonalImageCompression`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~PdfBitonalImageCompression.html) is a member of the `PdfCompression` enumeration that specifies the compression scheme used for bitonal images in the output PDF file.

- [`PdfColorImageCompression`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~PdfColorImageCompression.html) is a member of the `PdfCompression` enumeration that specifies the compression scheme used for color images in the output PDF file.

- [`PdfEnableColorDetection`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~PdfEnableColorDetection.html) is a Boolean value that specifies whether to use automatic color detection during the conversion that preserves image quality and reduces the output file size.

- [`PdfEnableLinearization`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~PdfEnableLinearization.html) is a Boolean value that specifies whether to linearize the output PDF to enable Fast Web View mode.

- [`PdfImageQuality`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~PdfImageQuality.html) is an integer from 0 to 100 that specifies the image quality in the output PDF file.

The example below creates a PDF document from a RAW file with a custom configuration:

### C#

```csharp

using GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter();
// Load the source document.
gdpictureDocumentConverter.LoadFromFile(@"C:\temp\source.raw", GdPicture14.DocumentFormat.DocumentFormatRAW);
// Configure the conversion.
gdpictureDocumentConverter.PdfColorImageCompression = PdfCompression.PdfCompressionJPEG;
gdpictureDocumentConverter.PdfImageQuality = 50;
// Save the output in a new PDF document.
gdpictureDocumentConverter.SaveAsPDF(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpictureDocumentConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()
    ' Load the source document.
    gdpictureDocumentConverter.LoadFromFile("C:\temp\source.raw", GdPicture14.DocumentFormat.DocumentFormatRAW);
    ' Configure the conversion.
    gdpictureDocumentConverter.PdfColorImageCompression = PdfCompression.PdfCompressionJPEG
    gdpictureDocumentConverter.PdfImageQuality = 50
    ' Save the output in a new PDF document.
    gdpictureDocumentConverter.SaveAsPDF("C:\temp\output.pdf")
End Using

```

#### Used methods and properties

- [`LoadFromFile`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~LoadFromFile.html)

- [`PdfColorImageCompression`]

- [`PdfImageQuality`]

- [`SaveAsPDF`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureDocumentConverter~SaveAsPDF.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)
---

## Related pages

- [Convert DWG or DXF to PDF in C#](/guides/dotnet/conversion/cad-to-pdf.md)
- [Convert bitmap (BMP) to PDF in C#](/guides/dotnet/conversion/bmp-to-pdf.md)
- [Convert emails (MSG/EML) to PDF in C#](/guides/dotnet/conversion/email-to-pdf.md)
- [Embed a font in a Word document](/guides/dotnet/conversion/embed-font-in-word-document.md)
- [Convert Excel to PDF in C#](/guides/dotnet/conversion/excel-to-pdf.md)
- [Convert HTML to PDF using C# and .NET](/guides/dotnet/conversion/html-to-pdf.md)
- [Convert files to PDF in C# .NET](/guides/dotnet/conversion.md)
- [Convert JPG to PDF in C#](/guides/dotnet/conversion/jpg-to-pdf.md)
- [Merge and combine multiple files into a PDF in C#](/guides/dotnet/conversion/merge-to-pdf.md)
- [Convert HTML to Word in C#](/guides/dotnet/conversion/html-to-word.md)
- [Convert images to PDFs in C#](/guides/dotnet/conversion/image-to-pdf.md)
- [Convert PDF to bitmap (BMP) in C#](/guides/dotnet/conversion/pdf-to-bmp.md)
- [Convert MS Office files to PDFs in C#](/guides/dotnet/conversion/office-to-pdf.md)
- [Converting a document from Markdown to PDF format](/guides/dotnet/conversion/markdown-to-pdf.md)
- [Convert PDF to Excel in C#](/guides/dotnet/conversion/pdf-to-excel.md)
- [Converting a document from PDF to Markdown format](/guides/dotnet/conversion/pdf-to-markdown.md)
- [Convert PDF to JPG in C#](/guides/dotnet/conversion/pdf-to-jpg.md)
- [Convert PDF to PDF/UA](/guides/dotnet/conversion/pdf-to-pdf-ua.md)
- [Convert PDF to other images in C#](/guides/dotnet/conversion/pdf-to-other-image.md)
- [Convert PDF to SVG in C#](/guides/dotnet/conversion/pdf-to-svg.md)
- [Convert PDF to PDF/A](/guides/dotnet/conversion/pdf-to-pdfa.md)
- [Convert PDF to PowerPoint in C#](/guides/dotnet/conversion/pdf-to-powerpoint.md)
- [Convert PDF to PNG in C#](/guides/dotnet/conversion/pdf-to-png.md)
- [Convert PDF to Word in C#](/guides/dotnet/conversion/pdf-to-word.md)
- [Convert PDF to TIFF in C#](/guides/dotnet/conversion/pdf-to-tiff.md)
- [Convert PNG to PDF in C#](/guides/dotnet/conversion/png-to-pdf.md)
- [Convert RTF to PDF in C#](/guides/dotnet/conversion/rtf-to-pdf.md)
- [Convert PowerPoint to PDF in C#](/guides/dotnet/conversion/powerpoint-to-pdf.md)
- [Convert SVG to PDF in C#](/guides/dotnet/conversion/svg-to-pdf.md)
- [Convert RTF to Word in C#](/guides/dotnet/conversion/rtf-to-docx.md)
- [Convert to MS Office from any file in C#](/guides/dotnet/conversion/any-file-to-office.md)
- [Convert text to PDF in C#](/guides/dotnet/conversion/text-to-pdf.md)
- [Convert TIFF to PDF in C#](/guides/dotnet/conversion/tiff-to-pdf.md)
- [Convert to Word, Excel, or PowerPoint in C#](/guides/dotnet/conversion/to-office.md)
- [Convert Word to PDF in C#](/guides/dotnet/conversion/word-to-pdf.md)
- [Convert images to PDFs in C#](/guides/dotnet/conversion/pdf-to-image.md)

