module HexaPDF::ImageLoader::PDF

This module is used for loading the first page of a PDF file.

Loaded PDF graphics are represented by form XObjects instead of image XObjects. However, the image/xobject drawing methods of HexaPDF::Content::Canvas know how to handle them correctly so that this doesn't matter from a user's point of view.

See: PDF1.7 s8.10



The magic marker that tells us if the file/IO contains an PDF file.

Public Class Methods

handles?(filename) → true or false
handles?(io) → true or false

Returns true if the given file or IO stream can be handled, ie. if it contains an image in JPEG format.

load(document, filename) → form_obj
load(document, io) → form_obj

Creates a PDF form XObject from the PDF file or IO stream.

See: DefaultConfiguration for the meaning of 'image_loader.pdf.use_stringio'.