[fpc-pascal] wkhtmltopdf - trying use h2pas...

Marcos Douglas md at delfire.net
Wed Feb 9 16:39:19 CET 2011


On Sat, Feb 5, 2011 at 6:13 AM, Michael Van Canneyt
<michael at freepascal.org> wrote:
>
>
> On Fri, 4 Feb 2011, Marcos Douglas wrote:
>
>> Hi,
>> I'm trying to use h2pas in wkhtmltopdf's headers... but I'm found many
>> erros.
>> Could you help me to translate the headers to use in Pascal?
>>
>> Command: h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l
>> wkhtmltox0.dll -o wkhtmltox0.pas -p
>> Enviroment: WinXP SP3 and FPC 2.4.3.
>> Project: http://code.google.com/p/wkhtmltopdf/
>> Files:
>> http://code.google.com/p/wkhtmltopdf/downloads/detail?name=libwkhtmltox-0.10.0_rc2.zip&can=2&q=
>
>
> With an editor, open pdf.h, and replace the CAPI macro with an empty string.
>
> Then, run
>
> h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l wkhtmltox0.dll -o
> wkhtmltox0.pas -D -p
>
> (do not forget the -D)
>
> If you're on windows, open the file and do a search and replace:
> cdecl
> with
> {$ifdef MSWINDOWS}stdcall{$else}cdecl{$endif}
>
> Then it should function.

Hi Michael,
I used the binary, at the end. I didn't have much time so...
Thank for the tip.


Marcos Douglas



More information about the fpc-pascal mailing list