I have a basic C function, which creates a pdf and then writes it to the disc with HPDF_SaveToFile(pdf, filename)
where pdf
is an instance of HPDF_Doc
.
But now I want to change the function behaviour so instead of writing to disc, it would return pdf as binary, which I will work with elsewhere.
How do I get binary from HPDF_Doc
variable?
Solved, here's how I did it:
this way
buffer
variable will contain the binary