HaruPDF library

HaruPDF library

Postby Massimo Linossi » Thu Feb 23, 2017 4:36 pm

Hi
Is it possible to compile this library to be used with xhb.com ?
I've downloaded an example with the source and I've seen that it creates pdf files in an easy and powerful way.
Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HaruPDF library

Postby Carlos Mora » Thu Feb 23, 2017 9:01 pm

Yes, you can. Someone in the Spanish forum compiled with xHarbour, AFAIK most of the possible differences between compilers have been solved, and we are here to help you to solve any trouble can arise.
Yo have 100% of the source code available, but the manual has not been translated to english yet. Anyway, there are complete tests to produce a complete invoice like pdf including inages, barcodes, full form drawing, etc.
Even thow it is a relatively new library, it is still growing, but it is being used in production environment so it works and can be used safely.
And eventual bugs get solved quickly.

Feel free to try and ask for help if you need.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: HaruPDF library

Postby Massimo Linossi » Fri Feb 24, 2017 8:21 am

Hi Carlo.
I've downloaded the library and a demo prg for testing.
Here is the result of the compilation.

Code: Select all  Expand view

Type: C >>>xhb.exe -o"obj\harupdf.c" -w1 -m -n -gc0 -q -es2  -I"\fwh\include"  -I"C:\xHB\include" -I"C:\xHB\include\w32" "harupdf.prg"<<<

xHarbour Compiler build 1.0.0 (SimpLex)
Copyright 1999-2007, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'obj\harupdf.obj'...

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"C:\xHB\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win"  "obj\harupdf.obj" "haru.lib" "png.lib" "xhb.lib" "dbf.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib -out:"test.exe"<<<

xLINK: error: Unresolved external symbol '_hb_fsNameConv referenced from haru.lib(harupdf.obj)'.
xLINK: error: Unresolved external symbol '_hb_arraySetND referenced from haru.lib(harupdf.obj)'.
xLINK: error: Unresolved external symbol '_hb_itemReturnRelease referenced from haru.lib(harupdf.obj)'.
xLINK: error: Unresolved external symbol '_hb_arraySetNI referenced from haru.lib(harupdf.obj)'.
xLINK: fatal error: 4 unresolved external(s).

Type: C >>>Couldn't build: test.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>>      1322<<<


Where can I find these functions ?
Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HaruPDF library

Postby Carlos Mora » Fri Feb 24, 2017 9:00 am

Ciao Massimo :)

Seems to be a problem related to compiler version. How did you build the lib? The one in the repository is built in Harbour, so that could be the issue.
Did you downloaded the repository? Please, to avoid lib building problems, include the prgs from the source directory straight into your project, to set appart the issues related to compilers and so. That's the way Ruben Dario got the lib working. May be later an expert in xHarbour can provide us with an script to get the lib built.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: HaruPDF library

Postby Massimo Linossi » Fri Feb 24, 2017 11:42 am

Hi Carlos.
I've not build the lib, I'm using the lib that I found on google group.
With another one I receive a linker error saying that the library is corrupt, but with this one the linker gives some
unresolved externals. So, I think that the library is compiled with XCC.
Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HaruPDF library

Postby Carlos Mora » Sat Feb 25, 2017 11:53 am

Can you post the links of what you downloaded? I can't find in the pulic repositories nothing named haru.lib. There is an hbhpdf.lib and things like that, but no one with that name.
If you are using the professional version of xHarbour may be you should ask for support to your supplier, it is a propietary product.
If you try Harbour probably you can get better help, at least to what is related to HaruPdf.
We even have a library on top of hbhpdf to make easier the conversion of FW print commands to pdf, and handles and reduces the inconveniences of managing things like fonts, images, etc.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: HaruPDF library

Postby Romeo » Sat Feb 25, 2017 1:15 pm

Please, can you post a simple demo.prg e where you downloaded the library/dll ?
tks
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: HaruPDF library

Postby Massimo Linossi » Sat Feb 25, 2017 3:43 pm

User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HaruPDF library

Postby Massimo Linossi » Sun Feb 26, 2017 12:02 pm

Hi.
I found these functions in harupdf.c that are not present inside my old xhb.com libraries.
In the new version there is no problem, I can compile the test and it is working perfectly.
I cannot rebuild this old procedure because of some incompatibility with new xhb.com version.
It is possible to replace these 4 functions with others ?

hb_arraySetND( info, 1, pt.x );

hb_arraySetNI( info, 1, dash.ptn[0] );

const char * pszFileName = hb_fsNameConv( hb_parc( 2 ), &pszFree );

hb_itemReturnRelease( info );

Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests