---
title: "PdfEncoderOptions Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PdfEncoderOptions.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# PdfEncoderOptions Class
 
This class holds PDF encoder options.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public NotInheritable Class PdfEncoderOptions _Inherits EncoderOptions
```
 
```csharp
public sealed class PdfEncoderOptions : EncoderOptions
```
 
## Remarks
  
Graphics Mill for .NET allows to save the bitmap as PDF file. You can specify compression type for it using [Compression](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_PdfEncoderOptions_Compression.htm.md) property. If you are using [Jpeg](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CompressionType.htm.md) compression, you can specify a JPEG quality via [Quality](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_PdfEncoderOptions_Quality.htm.md) property.
 
[MediaFormat](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_MediaFormat.htm.md) property of this class aalways returns value that equals to [PdfFormat](https://www.graphicsmill.com/docs/gm5/F_Aurigma_GraphicsMill_Codecs_FormatManager_PdfFormat.htm.md) static field of the [FormatManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_FormatManager.htm.md) class. [Left](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_Left.htm.md) and [Top](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_EncoderOptions_Top.htm.md) are meaningless for PDF and always set to 0.
 
## Examples
  
This code sample demonstrates how to save an image to the PDF file:
 
```
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\mountain.jpg")

bitmap.Save("C:\mountain.pdf", _
    New Aurigma.GraphicsMill.Codecs.PdfEncoderOptions(70))

bitmap.Dispose()
```
 
```csharp
using (Aurigma.GraphicsMill.Bitmap bitmap = 
           new Aurigma.GraphicsMill.Bitmap(@"c:\Mountain.jpg"))
{
    bitmap.Save(@"C:\Mountain.pdf", 
        new Aurigma.GraphicsMill.Codecs.PdfEncoderOptions(70));
}
```
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.Codecs.EncoderOptions](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_EncoderOptions.htm.md)
        - Aurigma.GraphicsMill.Codecs.PdfEncoderOptions
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_219.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_PdfEncoderOptions.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_19.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_Frame.htm.md)
  
## See Also

### Reference

- [PdfEncoderOptions Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Codecs_PdfEncoderOptions.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
