Hi, tried to wrap the WKHTML library (wkhtmltopdf.org) with NB to easily generate a PDF using HTML from Pharo. I think this could serve as an easy printing solution for Pharo. Code for an initial wrapper is on http://smalltalkhub.com/#!/~TorstenBergmann/WKHTML2PDF with a simple class calling the component using NativeBoost. See class "WKPDFLibrary example" I used Windows and the wkhtmltox.dll. The C example I follow with only a few function calls is very simple and can be found at the bottom of: http://m.blog.csdn.net/blog/pengqianhe/8089007 The component is called, I get correct structs in return - but still no PDF file is generated. Currently I cant see the forest for the trees. Maybe someone can have a short look what I'm doing wrong. Thanks in advance T.
Just out of curiosity, why not use Artefact, https://sites.google.com/site/artefactpdf ? I haven't looked at the different approaches, but I have this natural tendency against native libraries, if we can do it directly in Pharo. That is why I am asking: why this road and not the other ? On 21 May 2014, at 14:14, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
tried to wrap the WKHTML library (wkhtmltopdf.org) with NB to easily generate a PDF using HTML from Pharo. I think this could serve as an easy printing solution for Pharo.
Code for an initial wrapper is on http://smalltalkhub.com/#!/~TorstenBergmann/WKHTML2PDF with a simple class calling the component using NativeBoost. See class "WKPDFLibrary example" I used Windows and the wkhtmltox.dll.
The C example I follow with only a few function calls is very simple and can be found at the bottom of: http://m.blog.csdn.net/blog/pengqianhe/8089007
The component is called, I get correct structs in return - but still no PDF file is generated. Currently I cant see the forest for the trees. Maybe someone can have a short look what I'm doing wrong.
Thanks in advance T.
participants (2)
-
Sven Van Caekenberghe -
Torsten Bergmann