Skip to content

Commit

Permalink
Merge pull request #235 from denislavski/patch-1
Browse files Browse the repository at this point in the history
freeze offset format string
  • Loading branch information
boazsegev authored Dec 19, 2023
2 parents 82a0c47 + 2792ab5 commit db3b78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/combine_pdf/pdf_public.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def to_pdf(options = {})
# xref_location = 0
# out.each { |line| xref_location += line.bytesize + 1}
out << "xref\n0 #{indirect_object_count}\n0000000000 65535 f "
xref.each { |offset| out << ("%010d 00000 n " % offset) }
xref.each { |offset| out << ("%010d 00000 n ".freeze % offset) }
out << 'trailer'.freeze
out << "<<\n/Root #{false || "#{catalog[:indirect_reference_id]} #{catalog[:indirect_generation_number]} R"}"
out << "/Size #{indirect_object_count}"
Expand Down

0 comments on commit db3b78c

Please sign in to comment.