i was wondering if anyone could give me pointers on how to go about creating pdf files dynamically(without having to save the file as a pdf) from the vala language. i heard it can be done with libharu so ive been looking into their documentation but its still kinda hazy for me. does anyone know how to go about...
sending written annotations/text from a UI created with vala, to libharu? and having libharu create a pdf from it?
help would be much appreciated. thanks!
Even if the question is quite old I was in need of something similar...
As nemequ said you need to write a vapi to wrap the library.
This is a minimal one based on libhpdf 2.0.8 (not the latest)
=== Filename: haru.vapi ===
Then you can consume it from vala.
=== Filename: text_demo.vala ===
To compile (tried on windows you'll need to tweak the paths):
And to run: