Closed cw6365 closed 3 weeks ago
Best way would be to use HexaPDF::Document#add
, like this: obj = doc.add({}, stream: data_as_string)
.
You would use a StreamData
object if the data is not already stored in a string but in an IO or a file, see https://hexapdf.gettalong.org/documentation/api/HexaPDF/StreamData.html, e.g. obj = doc.add({}, stream: HexaPDF::StreamData.new(filename))
.
@gettalong how would i got about adding certificate streams in a DSS store like below?
I have a DER encoded object of the streams i want to insert. Do i use the HexaPDF::Stream | HexaPDF::StreamData ? Do you have any examples of how i would create these please?