Packages

 

com.aspose.imaging.imageoptions

Class OtgRasterizationOptions

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, Closeable, AutoCloseable


    public class OtgRasterizationOptions
    extends OdRasterizationOptions

    The Otg rasterization options

    Code example:

    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 Detail

      • OtgRasterizationOptions

        public OtgRasterizationOptions()