Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #364 Issue with Full Template #422

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/prawn/core/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def dimensions

def init_from_object(options)
@dictionary = options[:object_id].to_i
dictionary.data[:Parent] = document.state.store.pages
dictionary.data[:Parent] = document.state.store.pages if options[:page_template]

unless dictionary.data[:Contents].is_a?(Array) # content only on leafs
@content = dictionary.data[:Contents].identifier
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def compression_enabled?

def merge_template_options(page_options, options)
object_id = state.store.import_page(options[:template], options[:template_page] || 1)
page_options.merge!(:object_id => object_id )
page_options.merge!(:object_id => object_id, :page_template => true)
end

# setting override_settings to true ensures that a new graphic state does not end up using
Expand Down