@@ -101,15 +101,15 @@ def format_hash_to_pdf(object)
101
101
end
102
102
object [ :indirect_reference_id ] ||= 0
103
103
object [ :indirect_generation_number ] ||= 0
104
- return "#{ object [ :indirect_reference_id ] } #{ object [ :indirect_generation_number ] } R" . force_encoding ( Encoding ::ASCII_8BIT )
104
+ return "#{ object [ :indirect_reference_id ] } #{ object [ :indirect_generation_number ] } R" . b . force_encoding ( Encoding ::ASCII_8BIT )
105
105
end
106
106
107
107
# if the object is indirect...
108
108
out = [ ]
109
109
if object [ :indirect_reference_id ]
110
110
object [ :indirect_reference_id ] ||= 0
111
111
object [ :indirect_generation_number ] ||= 0
112
- out << "#{ object [ :indirect_reference_id ] } #{ object [ :indirect_generation_number ] } obj\n " . force_encoding ( Encoding ::ASCII_8BIT )
112
+ out << "#{ object [ :indirect_reference_id ] } #{ object [ :indirect_generation_number ] } obj\n " . b . force_encoding ( Encoding ::ASCII_8BIT )
113
113
if object [ :indirect_without_dictionary ]
114
114
out << object_to_pdf ( object [ :indirect_without_dictionary ] )
115
115
out << "\n endobj\n "
@@ -126,11 +126,11 @@ def format_hash_to_pdf(object)
126
126
# (using LESS-THAN SIGNs (3Ch) and GREATER-THAN SIGNs (3Eh)).
127
127
out << "<<\n " . b
128
128
object . each do |key , value |
129
- out << "#{ object_to_pdf key } #{ object_to_pdf value } \n " . force_encoding ( Encoding ::ASCII_8BIT ) unless PDF ::PRIVATE_HASH_KEYS . include? key
129
+ out << "#{ object_to_pdf key } #{ object_to_pdf value } \n " . b . force_encoding ( Encoding ::ASCII_8BIT ) unless PDF ::PRIVATE_HASH_KEYS . include? key
130
130
end
131
131
object . delete :Length
132
132
out << '>>' . b
133
- out << "\n stream\n #{ object [ :raw_stream_content ] } \n endstream" . force_encoding ( Encoding ::ASCII_8BIT ) if object [ :raw_stream_content ]
133
+ out << "\n stream\n #{ object [ :raw_stream_content ] } \n endstream" . b . force_encoding ( Encoding ::ASCII_8BIT ) if object [ :raw_stream_content ]
134
134
out << "\n endobj\n " if object [ :indirect_reference_id ]
135
135
out . join . force_encoding ( Encoding ::ASCII_8BIT )
136
136
end
0 commit comments