OtgRasterizationOptions

OtgRasterizationOptions class

The Otg rasterization options

public class OtgRasterizationOptions : OdRasterizationOptions

Constructors

NameDescription
OtgRasterizationOptions()The default constructor.

Properties

NameDescription
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.
BufferSizeHint { get; set; }Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
CenterDrawing { get; set; }Gets or sets a value indicating whether center drawing.
Disposed { get; }Gets a value indicating whether this instance is disposed.
DrawColor { get; set; }Gets or sets a foreground color.
FullFrame { get; set; }Gets or sets a value indicating whether [full frame].
MultiPageOptions { get; set; }The multipage options
PageHeight { get; set; }Gets or sets the page height.
PageSize { get; set; }Gets or sets the page size.
PageWidth { get; set; }Gets or sets the page width.
virtual Palette { get; set; }Gets or sets the color palette.
Positioning { get; set; }Gets or sets the positioning.
ProgressEventHandler { get; set; }Gets or sets the progress event handler.
ReplaceTextMapping { get; set; }Gets or sets the text replace mapping.
virtual ResolutionSettings { get; set; }Gets or sets the resolution settings.
SmoothingMode { get; set; }Gets or sets the smoothing mode.
Source { get; set; }Gets or sets the source to create image in.
TextRenderingHint { get; set; }Gets or sets the text rendering hint.
VectorRasterizationOptions { get; set; }Gets or sets the vector rasterization options.
virtual XmpData { get; set; }Gets or sets the XMP metadata container.

Methods

NameDescription
virtual Clone()Clones this instance.
CopyTo(VectorRasterizationOptions)Copies to.
Dispose()Disposes the current instance.

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