rust-skia icon indicating copy to clipboard operation
rust-skia copied to clipboard

Streaming PDFs

Open giacomocariello opened this issue 3 years ago • 1 comments

In PDF generation, it would be nice to be able to stream output, possibly asynchronously, instead of getting final byte array after close(). Would it be possible to expose self.stream's DynamicMemoryWStream in some way?

giacomocariello avatar Nov 20 '21 09:11 giacomocariello

It's not possible yet, but a good idea. As soon #569 gets merged, we will be able to interface with the io::Read trait. So I guess it should be possible to add a C++ class RustWStream in the same vain that writes to a type that implements the io::Write trait.

pragmatrix avatar Nov 24 '21 11:11 pragmatrix