prawn-ruby/pdf-core-0.6.0/lib/pdf/core/renderer.rb
# Renders the PDF document to string.
# Pass an open file descriptor to render to file.
#
Renders the PDF document to string.
Pass an open file descriptor to render to file.
Renders the PDF document to string . Pass an open file descriptor to render to file .
def render(output = StringIO.new, &block)
        if output.instance_of?(StringIO)
          output.set_encoding(::Encoding::ASCII_8BIT)
        end
        finalize_all_page_contents
        render_header(output)
        render_body(output)
        render_xref(output)
        render_trailer(output)
        if output.instance_of?(StringIO)
          str = output.string
          str.force_encoding(::Encoding::ASCII_8BIT)
          return str
        else
          return nil
        end
      end
def render ( output = StringIO . new , & block ) if output . instance_of? ( StringIO ) output . set_encoding ( :: Encoding :: ASCII_8BIT ) end finalize_all_page_contents render_header ( output ) render_body ( output ) render_xref ( output ) render_trailer ( output ) if output . instance_of? ( StringIO ) str = output . string str . force_encoding ( :: Encoding :: ASCII_8BIT ) return str else return nil end end
Renders the PDF document to string.
Renders the PDF document to string .
output
<not_specific>
new
<not_specific>
block
<not_specific>