Class OtgRasterizationOptions
Contents
[
Hide
]OtgRasterizationOptions class
The Otg rasterization options
public class OtgRasterizationOptions : OdRasterizationOptions
Constructors
Name | Description |
---|---|
OtgRasterizationOptions() | The default constructor. |
Properties
Name | Description |
---|---|
BackgroundColor { get; set; } | Gets or sets a background color. |
BorderX { get; set; } | Gets or sets the border X. |
BorderY { get; set; } | Gets or sets the border Y. |
CenterDrawing { get; set; } | Gets or sets a value indicating whether center drawing. |
DrawColor { get; set; } | Gets or sets a foreground color. |
PageHeight { get; set; } | Gets or sets the page height. If the value is 0, the source image aspect ratio will be preserved. |
PageSize { get; set; } | Gets or sets the page size. If one of SizeF dimensions is 0, the source image aspect ratio will be preserved. |
PageWidth { get; set; } | Gets or sets the page width. If the value is 0, the source image aspect ratio will be preserved. |
Positioning { get; set; } | Gets or sets the positioning. |
ReplaceTextMapping { get; set; } | Gets or sets the text replace mapping. |
SmoothingMode { get; set; } | Gets or sets the smoothing mode. |
TextRenderingHint { get; set; } | Gets or sets the text rendering hint. |
Methods
Name | Description |
---|---|
Clone() | Creates a new object that is a shallow copy of the current instance. |
virtual CopyTo(VectorRasterizationOptions) | Copies to. |
Examples
The following code snippet demonstrates how to convert an OTG image to PDF and other image formats.
[C#]
string dir = "c:\\aspose.imaging\\issues\\net\\3567\\";
string inputFilePath = dir + "VariousObjectsMultiPage.otg";
Aspose.Imaging.ImageOptionsBase[] options = { new Aspose.Imaging.ImageOptions.PngOptions(), new Aspose.Imaging.ImageOptions.PdfOptions() };
foreach (Aspose.Imaging.ImageOptionsBase saveOptions in options)
{
string extension = saveOptions is Aspose.Imaging.ImageOptions.PngOptions ? ".png" : ".pdf";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
{
Aspose.Imaging.ImageOptions.OtgRasterizationOptions otgRasterizationOptions = new Aspose.Imaging.ImageOptions.OtgRasterizationOptions();
otgRasterizationOptions.PageSize = image.Size;
saveOptions.VectorRasterizationOptions = otgRasterizationOptions;
image.Save(inputFilePath + extension, saveOptions);
}
}
See Also
- class OdRasterizationOptions
- namespace Aspose.Imaging.ImageOptions
- assembly Aspose.Imaging