render (PDF::Writer)

         # File lib/pdf/writer.rb, line 737
    737:   def render(debug = false)
    738:     add_page_numbers
    739:     @compression = false if $DEBUG or debug
    740:     @arc4.init(@encryption_key) unless @arc4.nil?
    741:
    742:     check_all_here
    743:
    744:     xref = []
    745:
    746:     content = "%PDF-#{@version}\n%âãÏÓ\n"
    747:     pos = content.size
    748:
    749:     objects.each do |oo|
    750:       cont = oo.to_s
    751:       content << cont
    752:       xref << pos
    753:       pos += cont.size
    754:     end
    755:
    756: #   pos += 1 # Newline character before XREF
    757:
    758:     content << "\nxref\n0 #{xref.size + 1}\n0000000000 65535 f \n"
    759:     xref.each { |xx| content << "#{'%010d' % [xx]} 00000 n \n" }
    760:     content << "\ntrailer\n"
    761:     content << "  << /Size #{xref.size + 1}\n"
    762:     content << "     /Root 1 0 R\n /Info #{@info.oid} 0 R\n"
    763:       # If encryption has been applied to this document, then add the marker
    764:       # for this dictionary
    765:     if @arc4 and @encryption
    766:       content << "/Encrypt #{@encryption.oid} 0 R\n"
    767:     end
    768:
    769:     if @file_identifier
    770:       content << "/ID[<#{@file_identifier}><#{@file_identifier}>]\n"
    771:     end
    772:     content << "  >>\nstartxref\n#{pos}\n%%EOF\n"
    773:     content
    774:   end