class HexaPDF::Writer

Parent

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 and returns the last XRefSection written.

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

write()

Writes the document to the IO object and returns the file position of the start of the last cross-reference section and the last XRefSection written.

write_incremental()

Writes the complete source document unmodified to the IO and then one revision containing all changes. Returns the file position of the start of the cross-reference section and the XRefSection object of that one revision.

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