Java 类com.lowagie.text.pdf.PdfStream 实例源码

项目:itext2    文件:Image.java   
/**
 * Sets the compression level to be used if the image is written as a compressed stream.
 * @param compressionLevel a value between 0 (best speed) and 9 (best compression)
    * @since    2.1.3
 */
public void setCompressionLevel(int compressionLevel) {
    if (compressionLevel < PdfStream.NO_COMPRESSION || compressionLevel > PdfStream.BEST_COMPRESSION)
        this.compressionLevel = PdfStream.DEFAULT_COMPRESSION;
    else
        this.compressionLevel = compressionLevel;
}
项目:PDFReporter    文件:Document.java   
@Override
public void setCompression(boolean compress) {
    if (compress) {
        pdfWriter.setFullCompression();
    } else {            
        pdfWriter.setCompressionLevel(PdfStream.NO_COMPRESSION);
    }
}
项目:PDFReporter    文件:Document.java   
@Override
public void setCompression(boolean compress) {
    if (compress) {
        pdfWriter.setFullCompression();
    } else {            
        pdfWriter.setCompressionLevel(PdfStream.NO_COMPRESSION);
    }
}
项目:DroidText    文件:Image.java   
/**
 * Sets the compression level to be used if the image is written as a compressed stream.
 * @param compressionLevel a value between 0 (best speed) and 9 (best compression)
    * @since    2.1.3
 */
public void setCompressionLevel(int compressionLevel) {
    if (compressionLevel < PdfStream.NO_COMPRESSION || compressionLevel > PdfStream.BEST_COMPRESSION)
        this.compressionLevel = PdfStream.DEFAULT_COMPRESSION;
    else
        this.compressionLevel = compressionLevel;
}