Re: [Cppcms-users] HTTP response and binary stream (libharu)
Brought to you by:
artyom-beilis
From: Joerg S. <jo...@br...> - 2015-09-17 13:46:51
|
On Thu, Sep 17, 2015 at 09:16:42PM +0800, augustin wrote: > I have no problem outputting HTML (std::string). > I have no problem outputting simple PDF files which only include a stream of > strings. > But when I try creating more complex PDF files with drawings or pictures (i.e. > PDF files including binary streams), the file gets corrupted and is not > rendered properly. Try creating a std::stringstream with std::ios::binary and write to that from your library. Use the stringstream -> string accessor and write that. That's what I am doing when creating PDFs from PoDoFo. Whether the default streams should be created as binary is a slightly different question. Joerg |