Class: HexaPDF::DocumentUtils

Inherits:
Object
  • Object
show all
Includes:
Files, Images
Defined in:
lib/hexapdf/document_utils.rb

Overview

This class provides utility functions for PDF documents. It is available through the HexaPDF::Document#utils method.

Some functions can’t be attributed to a single “manager” object. For example, while embedding a file can be done within a HexaPDF::Type::Filespecification object, loading an image from a file as a PDF object doesn’t have such a place. Such functions are available via this class.

Defined Under Namespace

Modules: Files, Images

Instance Method Summary collapse

Methods included from Files

#add_file, #each_file

Methods included from Images

#add_image, #each_image

Constructor Details

#initialize(document) ⇒ DocumentUtils

Creates a new DocumentUtils object for the given PDF document.



203
204
205
# File 'lib/hexapdf/document_utils.rb', line 203

def initialize(document)
  @document = document
end