Class SizeOptimizationType


  • public class SizeOptimizationType
    extends Object
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">If you use a JPEG "image type element," the file size can be automatically optimized. The corresponding optimization routine will attempt to limit the file to a max. size by gradually reducing the JPEG quality until the image is smaller than a specific size. If the "sizeOptimization" block is present, the image will be optimized. If it is not present, the image will not be optimized further after being exported.
     
                     </p>
     
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema"><b>Important:</b>
                         Please note that optimization can make the graphic export operation significantly slower. In addition to this, make sure to use values for the "dpi", "height", and "width" parameters that ensure that the size you want can actually be reached with compression.
                     </p>
     

    Java class for SizeOptimizationType complex type

    .

    The following schema fragment specifies the expected content contained within this class.

    
     <complexType name="SizeOptimizationType">
       <complexContent>
         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
           <attribute name="maxSize" type="{http://www.w3.org/2001/XMLSchema}int" default="100000" />
           <attribute name="maxRetries" type="{http://www.w3.org/2001/XMLSchema}int" default="5" />
           <attribute name="stepSize" type="{http://www.w3.org/2001/XMLSchema}int" default="10" />
         </restriction>
       </complexContent>
     </complexType>
     
    • Field Detail

      • maxSize

        protected Integer maxSize
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to define the maximum size of the JPEG file (file size), in bytes, that should be reached. The optimization routine will be successfully completed if the file reaches or falls below the specified file size. Make sure to use a value &gt; 0; otherwise, an error will be thrown.</p>
         
      • maxRetries

        protected Integer maxRetries
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to specify the number of runs that should be used for optimization. If the target size cannot be reached after the specified number of runs, the operation will be cancelled and an error code will be returned.</p>
         
      • stepSize

        protected Integer stepSize
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to define the increment by which the JPEG quality (jpegQuality) should be reduced every run in order to reach the desired file size. If the values for maxRetries and stepSize result in an illegal JPEG quality value being reached, the operation will be cancelled and an error code will be returned.</p>
         
    • Constructor Detail

      • SizeOptimizationType

        public SizeOptimizationType()
    • Method Detail

      • getMaxSize

        public int getMaxSize()
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to define the maximum size of the JPEG file (file size), in bytes, that should be reached. The optimization routine will be successfully completed if the file reaches or falls below the specified file size. Make sure to use a value &gt; 0; otherwise, an error will be thrown.</p>
         
        Returns:
        possible object is Integer
      • setMaxSize

        public void setMaxSize​(int value)
        Sets the value of the maxSize property.
        Parameters:
        value - allowed object is Integer
        See Also:
        getMaxSize()
      • isSetMaxSize

        public boolean isSetMaxSize()
      • unsetMaxSize

        public void unsetMaxSize()
      • getMaxRetries

        public int getMaxRetries()
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to specify the number of runs that should be used for optimization. If the target size cannot be reached after the specified number of runs, the operation will be cancelled and an error code will be returned.</p>
         
        Returns:
        possible object is Integer
      • setMaxRetries

        public void setMaxRetries​(int value)
        Sets the value of the maxRetries property.
        Parameters:
        value - allowed object is Integer
        See Also:
        getMaxRetries()
      • isSetMaxRetries

        public boolean isSetMaxRetries()
      • unsetMaxRetries

        public void unsetMaxRetries()
      • getStepSize

        public int getStepSize()
         <?xml version="1.0" encoding="UTF-8"?><p xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Used to define the increment by which the JPEG quality (jpegQuality) should be reduced every run in order to reach the desired file size. If the values for maxRetries and stepSize result in an illegal JPEG quality value being reached, the operation will be cancelled and an error code will be returned.</p>
         
        Returns:
        possible object is Integer
      • setStepSize

        public void setStepSize​(int value)
        Sets the value of the stepSize property.
        Parameters:
        value - allowed object is Integer
        See Also:
        getStepSize()
      • isSetStepSize

        public boolean isSetStepSize()
      • unsetStepSize

        public void unsetStepSize()