GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureDocumentConverter Class / PdfEnableColorDetection Property
Example





In This Topic
PdfEnableColorDetection Property (GdPictureDocumentConverter)
In This Topic
Enables or disables the automatic color detection feature when converting/saving the currently loaded document to PDF format.

The purpose is to automatically detect the original color of documents scanned in color mode and convert the B/W and/or grayscale ones to the appropriate bpp (bits-per-pixel) encoding. The result is allowing preservation of image quality while considerably reducing the file size.

Syntax
'Declaration
 
Public Property PdfEnableColorDetection As Boolean
 

Property Value

The default value is false.
Example
Re-compressing an existing PDF document using color detection.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
    gdpictureDocumentConverter.LoadFromFile("input.pdf", GdPicture14.DocumentFormat.DocumentFormatPDF)
    gdpictureDocumentConverter.PdfEnableColorDetection = True
    gdpictureDocumentConverter.SaveAsPDF("output.pdf", PdfConformance.PDF1_7)
End Using
See Also