public class CadInputOptions : InputOptions
Public Class CadInputOptions
Inherits InputOptions
Render as black background but keep foreground colors:
//Black background but foreground colors will be kept same as in the drawing.
//Foreground colors in the drawing are corrected automatically when required
//so that they are always visible on the set background color.
var inputOptions = new CadInputOptions
{
RenderBackgroundColor = Color.Black
};
DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Black background but foreground colors will be kept same as in the drawing.
'Foreground colors in the drawing are corrected automatically when required
'so that they are always visible on the set background color.
Dim inputOptions As New CadInputOptions() With {
.RenderBackgroundColor = Color.Black
}
DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)
Render as black and white:
//Black and white (all foreground colors will be fixed to White because the property is explictly set)
var inputOptions = new CadInputOptions
{
RenderBackgroundColor = Color.Black,
RenderForegroundColor = Color.White
};
DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Black and white (all foreground colors will be fixed to White because the property is explictly set)
Dim inputOptions As New CadInputOptions() With {
.RenderBackgroundColor = Color.Black,
.RenderForegroundColor = Color.White
}
DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)
Render as blueprint:
//Blueprint
var inputOptions = new CadInputOptions
{
RenderBackgroundColor = Color.FromArgb(58, 110, 180),
RenderForegroundColor = Color.White
};
DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Blueprint
Dim inputOptions As New CadInputOptions() With {
.RenderBackgroundColor = Color.FromArgb(58, 110, 180),
.RenderForegroundColor = Color.White
}
DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)
CadInputOptions | Initializes a new instance of the CadInputOptions class. |
CadInputOptions(DocumentFormat) | Initializes a new instance of the CadInputOptions class with a document format. |
Format | Gets or sets the format to convert from. (Inherited from InputOptions) |
Password | Gets or sets the password which is used for loading a protected document. (Inherited from InputOptions) |
RenderBackgroundColor | Gets or sets the background color of the drawing when it's rendered. The default is white. Default foreground color in the drawing is corrected automatically when required so that it's always visible on the set background color. |
RenderForegroundColor | Gets or sets the foreground color of the drawing when it's rendered. The default is null, which means foreground colors will be kept same as in the drawing. When set, all foreground colors will be fixed to this same color. For example, you can have a black and white or a blueprint output. |