Type Default Value Read Only Description
[C#]
string

[Visual Basic]
String
  "RGB" No The name of the output color space.

 

   

Notes
 

A string representation of the output color space. This property can take any of the following values:

  • RGB - red, green and blue
  • Gray - grayscale
  • CMYK - cyan, magenta, yellow and black
  • Lab - a device independent color space

The TIFF output format supports all color spaces. The JPG, GIF, PNG and .BMP. output formats support 8 bit RGB and 8 bit Gray only.

 

   

Example
 

The following example shows the effect that this parameter has on PDF rendering.

[C#]
Doc theDoc = new Doc();
theDoc.AddImage(Server.MapPath("../mypics/Shuttle.jpg"));
theDoc.Rect.String = theDoc.MediaBox.String;
// Render document in Gray colorspace
theDoc.Rendering.ColorSpace = "Gray";
theDoc.Rendering.DotsPerInch = 36;
theDoc.Rendering.Save(Server.MapPath("RenderingColorSpace.png"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.AddImage(Server.MapPath("../mypics/Shuttle.jpg"))
theDoc.Rect.String = theDoc.MediaBox.String
' Render document in Gray colorspace
theDoc.Rendering.ColorSpace = "Gray"
theDoc.Rendering.DotsPerInch = 36
theDoc.Rendering.Save(Server.MapPath("RenderingColorSpace.png"))
theDoc.Clear()


Shuttle.jpg


RenderingColorSpace.png