Packages

 

com.aspose.imaging.imageoptions

Class CdrRasterizationOptions

    • Constructor Detail

      • CdrRasterizationOptions

        public CdrRasterizationOptions()

        Initializes a new instance of the CdrRasterizationOptions class.

    • Method Detail

      • getPositioning

        public final int getPositioning()

        Gets the positioning.

        Value: The positioning.
        Returns:
        the positioning.
      • setPositioning

        public final void setPositioning(int value)

        Sets the positioning.

        Value: The positioning.
        Parameters:
        value - the positioning.
        Code example:

        The following example shows how to export all pages of CDR document to PDF.


        String dir = "c:\\aspose.imaging\\java\\issues\\1445\\";
        String inputCdrFileName = dir + "tiger.cdr";
        String outputPdfFileName = dir + "tiger.cdr.pdf";
        
        com.aspose.imaging.Image image = com.aspose.imaging.Image.load(inputCdrFileName);
        try {
            com.aspose.imaging.imageoptions.PdfOptions pdfOptions = new com.aspose.imaging.imageoptions.PdfOptions();
            com.aspose.imaging.imageoptions.CdrRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.CdrRasterizationOptions();
            rasterizationOptions.setTextRenderingHint(com.aspose.imaging.TextRenderingHint.SingleBitPerPixel);
            rasterizationOptions.setSmoothingMode(com.aspose.imaging.SmoothingMode.None);
            rasterizationOptions.setPositioning(com.aspose.imaging.imageoptions.PositioningTypes.DefinedByDocument);
            pdfOptions.setVectorRasterizationOptions(rasterizationOptions);
            image.save(outputPdfFileName, pdfOptions);
        }
        finally {
            image.close();
        }