class HexaPDF::Writer


Writes the contents of a PDF document to an IO stream.

Public Class Methods

new(document, io)

Creates a new writer object for the given HexaPDF document that gets written to the IO object.

write(document, io, incremental: false)

Writes the document to the IO object. If incremental is true and the document was created from an existing PDF file, the changes are appended to a full copy of the source document.

Public Instance Methods


Writes the document to the IO object.


Writes the complete source document and one revision containing all changes to the IO.

For this method to work the document must have been created from an existing file.