public class OtgRasterizationOptions extends OdRasterizationOptions
The Otg rasterization options
The following code snippet demonstrates how to convert an OTG image to PDF and other image formats.
String dir = "c:\\aspose.imaging\\issues\\java\\1461\\"; String inputFilePath = dir + "VariousObjectsMultiPage.otg"; com.aspose.imaging.ImageOptionsBase[] options = {new com.aspose.imaging.imageoptions.PngOptions(), new com.aspose.imaging.imageoptions.PdfOptions()}; for (com.aspose.imaging.ImageOptionsBase saveOptions : options) { String extension = saveOptions instanceof com.aspose.imaging.imageoptions.PngOptions ? ".png" : ".pdf"; com.aspose.imaging.Image image = com.aspose.imaging.Image.load(inputFilePath); try { com.aspose.imaging.imageoptions.OtgRasterizationOptions otgRasterizationOptions = new com.aspose.imaging.imageoptions.OtgRasterizationOptions(); otgRasterizationOptions.setPageWidth(image.getWidth()); otgRasterizationOptions.setPageHeight(image.getHeight()); saveOptions.setVectorRasterizationOptions(otgRasterizationOptions); image.save(inputFilePath + extension, saveOptions); } finally { image.close(); } }
Constructor and Description |
---|
OtgRasterizationOptions() |
OtgRasterizationOptions(VectorRasterizationOptions imageOptions) |
copyTo, getBackgroundColor, getBorderX, getBorderY, getCenterDrawing, getDrawColor, getPageHeight, getPageSize, getPageWidth, getSmoothingMode, getTextRenderingHint, setBackgroundColor, setBorderX, setBorderY, setCenterDrawing, setDrawColor, setPageHeight, setPageSize, setPageWidth, setSmoothingMode, setTextRenderingHint
deepClone, getBufferSizeHint, getMultiPageOptions, getPalette, getProgressEventHandler, getResolutionSettings, getSource, getVectorRasterizationOptions, getXmpData, setBufferSizeHint, setMultiPageOptions, setPalette, setProgressEventHandler, setResolutionSettings, setSource, setVectorRasterizationOptions, setXmpData
close, dispose, getDisposed
public OtgRasterizationOptions()
public OtgRasterizationOptions(VectorRasterizationOptions imageOptions)