def invoke_xobject(label)
save_graphics_state
xobject = find_xobject(label)
raise MalformedPDFError, "XObject #{label} not found" if xobject.nil?
matrix = xobject.hash[:Matrix]
concatenate_matrix(*matrix) if matrix
if xobject.hash[:Subtype] == :Form
form = PDF::Reader::FormXObject.new(@page, xobject)
@font_stack.unshift(form.font_objects)
@xobject_stack.unshift(form.xobjects)
yield form if block_given?
@font_stack.shift
@xobject_stack.shift
else
yield xobject if block_given?
end
restore_graphics_state
end