-
Notifications
You must be signed in to change notification settings - Fork 526
Bindings
So far, libharu provides bindings for Ruby, Delphi/Free Pascal, Lua, C#(Microsoft .NET platform) and Swift.
If you wrote bindings for other programing languages, please let us know.
On UNIX platform, exconf.rb is available. The installation process is as follows.
1. Build libharu. (See Documentation/Install chapter)
Note: In linux platform, adding -fPIC option on cflags is recommended for the performance improvement.
2. Change directory to "libharu-X.X.X/if/ruby" and run extconf.rb.
ruby extconf.rb
3. Then invoke "make install" command.
make install
The interface files for Delphi/Free Pascal is in "if/delphi" directory. To use this interface, build Haru as a shared-library (DLL) or use binary package for win32.
The source files for Free Basic bindings are in "if/freebasic" directory. See README.freebasic in the same dir on usage instructions.
The interface files for C# are in "if/c#" directory. To use this interface, build Haru as a shared-library (DLL) or use binary package for win32.
There are some example programs in demo directory. The steps to run the demonstration programs is as follows.
1. Build libharu as a shared library and copy libhpdf.dll to "if\c#\demo" directory. (Or extract the binary package for win32 and copy libhpdf.dll to "if\c#\demo" directory.)
2. Compile and run demo programs. (Don't forget to compile hpdf.cs together.)
csc /out:FontDemo.exe FontDemo.cs ..\hpdf.cs
FontDemo.exe
csc /out:ImageDemo.exe ImageDemo.cs ..\hpdf.cs
ImageDemo.exe
csc /out:JPFontDemo.exe JPFontDemo.cs ..\hpdf.cs
JPFontDemo.exe
csc /out:LineDemo.exe LineDemo.cs ..\hpdf.cs
LineDemo.exe
csc /out:OutlineDemo.exe OutlineDemo.cs ..\hpdf.cs
OutlineDemo.exe
csc /out:Encryption.exe Encryption.cs ..\hpdf.cs
Encryption.exe
csc /out:Permission.exe Permission.cs ..\hpdf.cs
Permission.exe
csc /out:RawImageDemo.exe RawImageDemo.cs ..\hpdf.cs
RawImageDemo.exe
csc /out:TextDemo.exe TextDemo.cs ..\hpdf.cs
TextDemo.exe
Because I do not know the Visual studio well, I do not explain usage on Visual Studio here.
Note: libhpdf.dll is required to run the program which uses C# interface for libharu. I tested this interface only in Microsoft .NET Framework SDK 1.1.
PHP extension is available in PECL: http://pecl.php.net/haru
See PHP manual for instructions on how to install it.
Extension documentation is also available in the manual: http://php.net/haru
Perl bindings are available in CPAN: http://search.cpan.org/~butilw/PDF-Haru-1.00/lib/PDF/Haru.pm
hpdf.js is port of libharu to JavaScript: https://github.com/manuels/hpdf.js
LuaHPDF is a binding of libharu to Lua: http://luahpdf.colloquiki.com/
SwiftyHaru wraps libharu in a safe object-oriented manner, letting you use the full power of the Swift programming language to create PDF documents. https://github.com/WeirdMath/SwiftyHaru