Method: RBPDF#SetCompression

Defined in:
lib/rbpdf.rb

#SetCompression(compress) ⇒ Object Also known as: set_compression

Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default.

  • Note: the Zlib extension is required for this feature. If not present, compression will be turned off.

@param boolean :compress

Boolean indicating if compression must be enabled.

@access public
@since 1.4


1445
1446
1447
1448
1449
1450
1451
1452
# File 'lib/rbpdf.rb', line 1445

def SetCompression(compress)
  #Set page compression
  if Object.const_defined?(:Zlib)
    @compress = compress
  else
    @compress = false
  end
end