Module: Prawn::Document::Internals
- Defined in:
- lib/prawn/document/internals.rb
Instance Method Summary collapse
-
#fresh_content_streams(options = {}) ⇒ Object
adds a new, empty content stream to each page.
Instance Method Details
#fresh_content_streams(options = {}) ⇒ Object
adds a new, empty content stream to each page. Used in templating so that imported content streams can be left pristine
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/prawn/document/internals.rb', line 9 def fresh_content_streams( = {}) (1..page_count).each do |i| go_to_page i state.page.new_content_stream () generate_margin_box use_graphic_settings([:template]) forget_text_rendering_mode! end end |