LibHaru - PDF with Barcode 128C

1,516 views
Skip to first unread message

Qatan

unread,
Oct 19, 2010, 11:58:42 PM10/19/10
to harbou...@googlegroups.com
Hello,
 
    Does anyone knows how to use the libHaruPDF to create a PDF with barcode?
 
 
    But I don´t have any idea how to use it to create a barcode
    
    Any hits are wecolme.
 
 
Qatan

David MS

unread,
Oct 20, 2010, 4:12:52 AM10/20/10
to Harbour Users
Qatan

The best way is use a barcode font.

Best Regard
David.

On 20 oct, 05:58, "Qatan" <wanstad...@gmail.com> wrote:
> Hello,
>
>     Does anyone knows how to use the libHaruPDF to create a PDF with barcode?
>
>     I found this on the libHaru dicution group:http://groups.google.com/group/libharu/browse_thread/thread/e538bde73...

Qatan

unread,
Oct 20, 2010, 9:49:45 AM10/20/10
to harbou...@googlegroups.com
Hello David,

Yes, I agree with you.
I was trying to import the barcode font but without success.
Do you know how to use it?
I was trying something like:

font_name = HPDF_LoadTTFontFromFile( pdf, "c:\pdf\code128.ttf",
HPDF_TRUE )
def_font3 := HPDF_GetFont( pdf, font_name, "WinAnsiEncoding" )

Any help will be highly appreciated.
Regards,

Qatan


Qatan

Best Regard
David.

--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

David MS

unread,
Oct 20, 2010, 12:26:41 PM10/20/10
to Harbour Users
Qatan,

The Pdf haru library is a bit delicate at the time of loading ttf or
otf fonts, I don't know why some fonts are loaded and others not. But
I have found a way to load any ttf font with haru pdf lib by
transforming it with a 3rd application.

I think this matter is out of the forum's theme, can you contact me
via PM?
> > But I don�t have any idea how to use it to create a barcode

David MS

unread,
Oct 20, 2010, 1:07:48 PM10/20/10
to Harbour Users
Qatan,

That is the right way, what happens is that as I said in my previous
post this library is very ""tiquismiquis" and not just the barcode
fonts but many other fonts.

You can test is the font has loaded with:
font_name = HPDF_LoadTTFontFromFile( pdf, "c:\pdf
\code128.ttf",HPDF_TRUE )
def_font3 := HPDF_GetFont( pdf, font_name, "WinAnsiEncoding" )

if Empty(font_name)
//Font not loaded
endif

Best Regards,
David



On 20 oct, 15:49, "Qatan" <wanstad...@gmail.com> wrote:
> > But I don�t have any idea how to use it to create a barcode

Maurizio la Cecilia

unread,
Oct 20, 2010, 1:17:29 PM10/20/10
to harbou...@googlegroups.com
Hi,
the barcode font appears to be correctly loaded, but when the characters are printed to pdf are showed as alphanumeric and not as barcode.
In my test HPDF_LoadTTFontFromFile() returns correctly "Code128,Normal" after loading the font, if the font don't load properly i should obtain a NIL return value.
As Viktor said, HaruPDF don't manage correctly the barcode font.
Maurizio

David MS

unread,
Oct 20, 2010, 1:43:55 PM10/20/10
to Harbour Users
Hi Maurizio,

I disagree on this point with Viktor,

On Internet you can easily find many sources for the various existing
bar codes, most of them are for payment and pdf haru library has no
problems with them. My problem was finding a free one that worked.

As I said I found the solution through a third application.
I have worked perfectly with BAR39 barcode fonts and haru pdf lib and
also with other (non barcode) problematic fonts.

IMHO I think it's an elegant way as there is a direct correspondence
between the character and the sign. I think the opposite is reinvent
the wheel. For example, do not think anyone try to draw Arabic letters
its more easy to load a font with these characters.

Best Regards,
David Montano.

vszakats

unread,
Oct 20, 2010, 2:04:15 PM10/20/10
to Harbour Users
Hi,

> I disagree on this point with Viktor,

It's not my opinion. Please visit libharu forum, it was posted
by the libharu code maintainer at the time, which I've found after
experiencing similar wrong results reported by Qatan. BTW libharu
forum has quite many similar reports. I also tried to patch the
code, but it's clearly missing for some required code, so it's not
just a matter of "enabling" these fonts by a flip switch. Having
said that, I can imagine there might exist some workaround.

> On Internet you can easily find many sources for the various existing
> bar codes, most of them are for payment and pdf haru library has no
> problems with them. My problem was finding a free one that worked.
>
> As I said I found the solution through a third application.
> I have worked perfectly with BAR39 barcode fonts and haru pdf lib and
> also with other (non barcode) problematic fonts.

It would be great help if you could post these (or pointer to the
tool), so we can make some tests.

> IMHO I think it's an elegant way as there is a direct correspondence
> between the character and the sign. I think the opposite is reinvent
> the wheel. For example, do not think anyone try to draw Arabic letters
> its more easy to load a font with these characters.

Drawing rectangles is not reinventing the wheel, any slightly
serious barcode library does it that way, since it can cover large
spectrum of barcode types without having to host a ton of .ttfs.
Storing rectangles in .pdfs is also more economic if file size
is a concern. Not to mention that most barcode fonts are not
free.

Anyhow if there is working .ttf solution (possible free), all the
better and it's probably enough for many business apps.

Viktor

David MS

unread,
Oct 20, 2010, 2:49:19 PM10/20/10
to Harbour Users
Hi Viktor,

I meant to say with "your point of view" in reference to the elegance
or not of the font method, I have confused with this forum and your
post on the developer forum, sorry.


Like example:

I has take this free GNU font at

http://www.fonts4free.net/code-128-font.html

this font is not loaded by HPDF_LoadTTFontFromFile

I make "the transformation" of the font with a third application and
now the font is loaded and works fine with Haru PDF library. The third
application is for commercial use and I don´t want to mention it.

I dont know if fonts saved with this application have a watermark and
I dont want legal claims. If you want an example I can send you an PM
with a PDF maked with harbour and haru with barcode128 font.

I only want to say that I don´t see the limitation of haru with this
kind of fonts, it's possible the problem is only the font.

Best regards,
David.

vszakats

unread,
Oct 20, 2010, 3:56:34 PM10/20/10
to Harbour Users
Hi David,

> I meant to say with "your point of view" in reference to the elegance
> or not of the font method, I have confused with this forum and your
> post on the developer forum, sorry.

No problem. I'd argue with the elegance. The only advantage
of using .ttfs is that it's simpler to use, if it works.

> http://www.fonts4free.net/code-128-font.html
>
> this font is not loaded by HPDF_LoadTTFontFromFile
>
> I make "the transformation" of the font with a third application and
> now the font is loaded and works fine with Haru PDF library. The third
> application is for commercial use and I don´t want to mention it.

So we're back at square one.

> I dont know if fonts saved with this application have a watermark and
> I dont want legal claims. If you want an example I can send you an PM
> with a PDF maked with harbour and haru with barcode128  font.

No thank you, I believe you it works for you, but it won't
help me or most users.

> I only want to say that I don´t see the limitation of haru with this
> kind of fonts, it's possible the problem is only the font.

Nope, the support is missing for certain TTF
features, which causes that 'symbol' type of fonts cannot
work properly (also Wingdings and Webdings and the
like have problems). Pbly your tool does some tricks
which works around that limitation.

See one "easy" solution (I didn't try it):
http://groups.google.com/group/libharu/browse_thread/thread/c81f7efe8e6c9dba#

Here are some more threads on this:
http://groups.google.com/group/libharu/browse_thread/thread/3a517aa169232bb4#
http://groups.google.com/group/libharu/browse_thread/thread/fc2377940f36c216#
http://groups.google.com/group/libharu/browse_thread/thread/e538bde730caba44

BTW final 2.2.0 is out.

Viktor

Qatan

unread,
Oct 20, 2010, 9:01:19 PM10/20/10
to harbou...@googlegroups.com
Hello David,

I tested the way you mentioned but it does not load the TTF font and
when it happens it does not create the PDF file.
Seems that LibHaru does not have support for barcodes yet but I am sure
there is someway around it to make it to work. IMO it is a must to have
feature since barcodes are widely used in many places/situations.
Thanks for your suggestion and help.

Qatan


Qatan,

Best Regards,
David

> > But I don�t have any idea how to use it to create a barcode

Qatan

unread,
Oct 20, 2010, 9:14:58 PM10/20/10
to harbou...@googlegroups.com
Hello Maurizio,
   
    Thanks for answering.
    Seems that Viktor is right in saying that LibHaru does not support it yet. At least it didn't work in my tests... maybe I did something wrong but after I saw this: http://groups.google.com/group/libharu/browse_thread/thread/e538bde730caba44/0265a3ca8fa06529?lnk=gst&q=barcode#0265a3ca8fa06529 I came to think that "maybe" a good solution would be to create my own barcode generator using rectangles although it is not really what I want to do since it would change my focus right now and would cost too much time to learn deeply about barcodes and to acctually draw it bar-by-bar and create a way to use it easly in my application. It would be a new project to me... I have to agree that LibHaru is nice and I was quite surprised by the great results in my little project. My small program is in CUI mode (GTWVT) but delivers quality PDF files.
    I will not give up yet. I belive there is someway around that "limitation?".

Maurizio la Cecilia

unread,
Oct 21, 2010, 3:15:44 AM10/21/10
to harbou...@googlegroups.com
Hi Qatan,
we reached same point.
I also use gtwvt and libHaru intensively and very satisfactely.
I'm also hwGUI project administrator and I know a solution exists but, AFAIR, the barcode implementation is little rough and i did not tested.
Let me do some look into in the next weekend.
Best regards.
Maurizio

PS: you or someone else in the group knows some harbour or portable code for QR code generation? I'm very interested about this.

David MS

unread,
Oct 21, 2010, 4:36:58 AM10/21/10
to Harbour Users
Hi Viktor,

> Nope, the support is missing for certain TTF
> features, which causes that 'symbol' type of fonts cannot
> work properly (also Wingdings and Webdings and the
> like have problems). Pbly your tool does some tricks
> which works around that limitation.

I agree. I've commented in previous posts that haru has problem with
many fonts not only with code bars fonts, so It seem the same problem.
I only copy &paste the glyphs from one font (that no load) to other
font. I think the problem is in the properties of the container of
these glyphs, not in themselves.

So do not doubt Haru limitations with some sources (which nobody
disputes), the only thing I repeat that these limitations have nothing
to do with bar codes fonts. In a font there is no difference between
a glyph that represents an "a" or a set of bars, both are just
drawings.

I've already checked with many sources that did not load haru and have
nothing to do with bars or Weddings or symbol type.

Qatan,

Is normal that not work. To do this, you will need a font
"transformed"

Best Regards,
David

vszakats

unread,
Oct 21, 2010, 5:40:26 AM10/21/10
to Harbour Users
Hi David and All,

> So do not doubt Haru limitations with some sources (which nobody
> disputes), the only thing I repeat that these limitations have nothing
> to do with bar codes fonts. In a font  there is no difference between
> a glyph that represents an "a" or a set of bars, both are just
> drawings.

Yes, for sure it's not the shape of the glyph by itself
which is not supported by libharu.

> I've already checked with many sources that did not load haru and have
> nothing to do with bars or Weddings or symbol type.

I'm sorry, but I'm now not sure what we're arguing about,
and I don't feel we're getting closer to the solution by
circling around a secret commercial tool.

We need a real solution, and I think we need a barcode
lib for Harbour, which is able to spit out a bunch of
rectangles as a result, which we can then render on
GDI device or libharu page.

Alternatively someone may try to patch libharu sources
to add missing functionality (or, finding an open alternative
for secret transformation tool). This seems more complicated,
plus then there is the problem of finding proper open
barcode fonts, which are scarce. Then the handling of
those .ttfs.

Viktor

alcisoft

unread,
Oct 20, 2010, 6:02:47 AM10/20/10
to harbou...@googlegroups.com
vszakats,

Fivewin developers using Cayetano's codebar lib, provided with sources. Do
not use codebar fonts.


Regards


Hi David and All,

Viktor

--

vszakats

unread,
Oct 21, 2010, 6:21:15 AM10/21/10
to Harbour Users
Hi,

> Fivewin developers using Cayetano's codebar lib, provided with sources. Do
> not use codebar fonts.

Sounds good, thanks for the pointer.

Viktor

David MS

unread,
Oct 21, 2010, 6:35:02 AM10/21/10
to Harbour Users
Hi Viktor,

> I'm sorry, but I'm now not sure what we're arguing about,
> and I don't feel we're getting closer to the solution by
> circling around a secret commercial tool.

Sorry I want to say "fonts" instead of "sources",(thanks to google
translation :)

> We need a real solution, and I think we need a barcode
> lib for Harbour, which is able to spit out a bunch of
> rectangles as a result, which we can then render on
> GDI device or libharu page.

I pray for that lib. I'm not opposite to this. I simply wanted to
respond to Qatan, not give a general solution to all people of an old
problem.

After that, we discussed the problem of haru pdf with fonts and I made
clear my opinion of the topic, and again is that haru has no problem
only with bar-code fonts.I think the problem is not the glyphs are
some fonts.

> Alternatively someone may try to patch libharu sources
> to add missing functionality (or, finding an open alternative
> for secret transformation tool). This seems more complicated,
> plus then there is the problem of finding proper open
> barcode fonts, which are scarce. Then the handling of
> those .ttfs.

For my part I will try to find a free font editor that allows copy &
paste with glyphs.
There are a lot of gnu or free fonts that we can use if we find this
free transformation tool.

Best Regards,
David.

vszakats

unread,
Oct 21, 2010, 7:11:58 AM10/21/10
to Harbour Users
> After that, we discussed the problem of haru pdf with fonts and I made
> clear my opinion of the topic, and again is that haru has no problem
> only with bar-code fonts.I think the problem is not the glyphs are
> some fonts.

The problem is described quite well in the libharu forum.

> For my part I will try to find a free font editor that allows copy &
> paste with glyphs.
> There are a lot of gnu or free fonts that we can use if we find this
> free transformation tool.

Okay. If you've found some freely usable barcode fonts which
work with libharu, please post them here. It will be useful
information for everyone with similar needs.

Viktor

David MS

unread,
Oct 21, 2010, 8:23:32 AM10/21/10
to Harbour Users
Viktor,

> Okay. If you've found some freely usable barcode fonts which
> work with libharu, please post them here. It will be useful
> information for everyone with similar needs.
>
> Viktor

I didn't say I've fonts that works directly in Haru so I can´t post
here.
I've said that I will try to find an free alternative to the actual
commercial transformation tool.

The sources I use are GNU but I'm not sure if the actual application
leaves his watermark.

Thanks
David

Maurizio Faccio adinet

unread,
Oct 21, 2010, 9:07:04 AM10/21/10
to harbou...@googlegroups.com
What we have to find is some piece of code that transform a string in a
codebar image, that then we can insert that image into PDF.

I've found this.

http://www.zint.org.uk/zintSite/Manual.aspx?page=1
Hope it helps


Maurizio


El 21/10/2010 08:21 a.m., vszakats escribi�:

Qatan

unread,
Oct 21, 2010, 8:15:37 AM10/21/10
to harbou...@googlegroups.com
Hello Maurizio,
 
    I greately thank you for any help.
    I was impressed by this nice tool and I belive there is someway to make it to work for barcodes.

Qatan

unread,
Oct 21, 2010, 8:41:29 AM10/21/10
to harbou...@googlegroups.com
Hello David,

It is a new problem to me and I am happy to get such a response from the
group.
It seems that the final solution and maybe the best one would be to
create harbour function to actually draw the barcodes and use that tool
instead of fonts BUT right now it is not a close solution for my situation
and I would be pleased to try the "tranformed" font solution although it
seems an ugly solution. Anyway will help me greately.
Is there any way I could send or point to you where to get the free
barcode and you transform it to me in your tool and send me back so I would
test it to see it it would work for me.
The best place I've found to get fonts and information about barcode is
this one: http://grandzebu.net/index.php The website is in Frech but there
is a English flag for English version. You will get a list of useful free
barcodes.
Other good place for free fonts: http://www.fonts4free.net/
I hope it will be useful for others too.
Thanks for all your efforts.

Qatan

----- Original Message -----
From: "David MS" <da...@gesintur.com>
To: "Harbour Users" <harbou...@googlegroups.com>
Sent: Thursday, 21 de October de 2010 05:36
Subject: [harbour-users] Re: LibHaru - PDF with Barcode 128C

Qatan

unread,
Oct 21, 2010, 12:02:09 PM10/21/10
to harbou...@googlegroups.com
>We need a real solution, and I think we need a barcode
>lib for Harbour, which is able to spit out a bunch of
>rectangles as a result, which we can then render on
>GDI device or libharu page.

Probably that would be the right solution...

David MS

unread,
Oct 21, 2010, 12:35:50 PM10/21/10
to Harbour Users
I found this:

http://www.megaupload.com/?d=POI6ZAVD

Please test

David MS

unread,
Oct 21, 2010, 1:08:04 PM10/21/10
to Harbour Users
I found one more, this is code 39 extended

http://www.megaupload.com/?d=77RHXGAB

Best Regards,
David

Qatan

unread,
Oct 21, 2010, 3:23:43 PM10/21/10
to harbou...@googlegroups.com
Hello alcisoft,

Thanks for bringing ideas... it may be helpful.
I will look into it.
Regards

Qatan

----- Original Message -----
From: "alcisoft" <alci...@arrakis.es>
To: <harbou...@googlegroups.com>

Qatan

unread,
Oct 21, 2010, 3:24:27 PM10/21/10
to harbou...@googlegroups.com
Hello Maurizio,

Thanks for helping with more alternatives.
This is not really the final solution but will certainly help until it
comes.
Regards,

Qatan

I've found this.


Maurizio

--

David MS

unread,
Oct 21, 2010, 2:33:23 PM10/21/10
to Harbour Users

Hi Qatan,

Now you can do the tests. Be carefull that barcode128 requires begin
with a start code "{" followed by the string you want codify, a
checksum code and a end code "~". The checksum's code must to be
calculated, I can you give a link where's described the algorithm.

I recomend you, if that it's posssible to use code39 because it's
easy to handle, no checksum characters required and it will read by
almost any scanner.

Best Regards,
David

Qatan

unread,
Oct 21, 2010, 9:24:10 PM10/21/10
to harbou...@googlegroups.com
Hello David,

It works well with LibHaru.
I know it is not a nice solution. The best thing would be create the
barcode from inside harbour application without having to depend on TTF
font. Also it is not portable.
Anyway it will help me for now since I do not have enough time to jump
on other project to make barcode but it is something to-do for sure.
Unfortunately I have to use Code 128 type "C" on this particular
project.
Thanks for your great help.

Qatan


----- Original Message -----
From: "David MS" <da...@gesintur.com>
To: "Harbour Users" <harbou...@googlegroups.com>
Sent: Thursday, 21 de October de 2010 15:33
Subject: [harbour-users] Re: LibHaru - PDF with Barcode 128C


>

Qatan

unread,
Oct 21, 2010, 10:34:32 PM10/21/10
to harbou...@googlegroups.com
Hello Maurizio,

I was reading about Zint and tried the Command Line utility.
It is very nice!
Maybe what we could do is to use their barcode expertise and introduce
it in Harbour as the solution for any barcode need.
Since barcodes are something very specific and specialized I belive it
should be used this way: By using a tool that will integrate into Harbour.
I also looked a bit into
http://www.gnu.org/software/barcode/barcode.html but I liked the Zint
because covers a lot o barcode types and seems to be very specialized.
I do not know "C" but I know Zint is written in "C" and it is
distribuited under GNU General Public License version 3.
I know it would be a huge task to create a Harbour wrapper to it but
seems a good solution.
Any comments?

Qatan


----- Original Message -----
From: "Maurizio Faccio adinet" <mau...@adinet.com.uy>

I've found this.


Maurizio

--

Qatan

unread,
Oct 21, 2010, 11:04:00 PM10/21/10
to harbou...@googlegroups.com
Hello Maurizio and all,

Look this comparation table:
http://www.zint.org.uk/zintSite/Comparison.aspx
Zint is very complete, written in "C" with API documented in their site,
portable, seems to be a good solution.
Regards,

Qatan

----- Original Message -----
From: "Maurizio Faccio adinet" <mau...@adinet.com.uy>
To: <harbou...@googlegroups.com>
Sent: Thursday, 21 de October de 2010 10:07

I've found this.


Maurizio

--

Alex Strickland

unread,
Oct 22, 2010, 2:22:21 AM10/22/10
to harbou...@googlegroups.com
On 2010/10/22 05:04 AM, Qatan wrote:

> Look this comparation table:
> http://www.zint.org.uk/zintSite/Comparison.aspx
> Zint is very complete, written in "C" with API documented in their site,
> portable, seems to be a good solution.

The license is not suitable for commercial work.
--
Alex

David MS

unread,
Oct 22, 2010, 6:16:44 AM10/22/10
to Harbour Users
Hi Qatan and all,

I yet said I see more advantages in the drawing of bars, but the
reality is that at this point to that library does not exist or not
have implement today in haru. So I sent you a workable solution.

Regardless of all that both methods have their pros and cons. In my
case I usually work with web applications and the question of
portability does not bother me, for working with desktop applications
will be more important.

Anyway there is one thing to consider is the loss of information in
bar method, I mean:

When you write a string with a bar font information is accessible both
visually (by a scanner) and parsing the file. In contrast, if you use
bunch of rectangles this information will be only accessible by a
scanner or an external application that simulate a scanner (pay
required of course) or you have to force the rewriting of the code
either visually (eg code below) or hidden writing (pretty ugly). I
don't know if can be other alternatives to this.

In this scenario, imagine you have to parse a file and get all the
codes contained in, or search for a particular code from multiple PDF
files.

Using fonts, if you write "hello" does not matter if you use Arabic,
ancient Greek or bar codes ... information is reachable both by the
search tool in your PDF viewer or any application. (Eg the search tool
of your O.S).

Best Regards,
David.

Qatan

unread,
Oct 22, 2010, 7:53:56 AM10/22/10
to harbou...@googlegroups.com
Hello Alex,

> The license is not suitable for commercial work.

Are you sure? AFAIK you can distribuite any GPL program that you use in you
program (may be a library or part of it), commercialy withou any problems
and that you should make your customers aware they have their rights under
the GPL and to make souce code of the Fress Software Foundation freely
available (in your website or upon their request on any media). I am not
sure you should make your own work available since you are using other parts
(like Harbour itself under different license)...
I don�t think this is the right place to discuss about GPL but I really
would like to understand about it, please correct me if I am wrong.
Any information would be apprecitated.

Qatan

Qatan

unread,
Oct 22, 2010, 8:18:13 AM10/22/10
to harbou...@googlegroups.com
Hello David,

>I yet said I see more advantages in the drawing of bars, but the
>reality is that at this point to that library does not exist or not
>have implement today in haru. So I sent you a workable solution.

I agree with that and really thank you for helping with your workable
solution. I am using it right now!
I found other sugestion from Maurizio a good one too:
http://www.zint.org.uk/zintSite/Manual.aspx?page=1 and I am trying it too.

>Anyway there is one thing to consider is the loss of information in
>bar method, I mean:
>
>When you write a string with a bar font information is accessible both
>visually (by a scanner) and parsing the file. In contrast, if you use
>bunch of rectangles this information will be only accessible by a
>scanner or an external application that simulate a scanner (pay
>required of course) or you have to force the rewriting of the code
>either visually (eg code below) or hidden writing (pretty ugly). I
>don't know if can be other alternatives to this.

I am not sure I understood but I belive it would work as well:

Font solution:
1) select the font: HPDF_Page_SetFontAndSize( page, font, size )
2) print the string: HPDF_Page_TextOut( page, col, lin, string )

Rectangle solution (just an example):
1) execute a function:
HPDF_Page_DrawImage( page, CreateBarCodeImage( string ), col, lin, sizeup,
sizeright )

In both cases you will have "string".

Am I wrong? Please correct me or point to what would not work so I can
understand what you mean

>In this scenario, imagine you have to parse a file and get all the
>codes contained in, or search for a particular code from multiple PDF
>files.

I would recommend to create the PDF with the string (under) the barcode to
help with the search...


>Using fonts, if you write "hello" does not matter if you use Arabic,
>ancient Greek or bar codes ... information is reachable both by the
>search tool in your PDF viewer or any application. (Eg the search tool
>of your O.S).

Well, not sure again but the string must to be transfored in other code to
be printed as Barcode.
Example: 123123123123123 will look like: �,?7,?7,�3�� so it will correspond
to the barcode fonts that represent the string 123123123123123.


I am not trying to argue with you. I really want to understand what you are
trying to say and how to find a good solution and please correct me if I am
wrong.

Qatan

Alain Aupeix

unread,
Oct 22, 2010, 7:40:29 AM10/22/10
to harbou...@googlegroups.com
Hi, opening project properties is ok using 'Project Properties' toolbar
button. It opens blank properties using menus (View or Project)

I don't know if it's only a linux bug.

I have also another problem, but I think I don't do it well.
I have compiled a great part of contribs, and put all the libraries
generated (a files) in /usr/local/lib/harbour as root obviously.

I want then to use the function cd() from libhbmisc.
I add -llibhbmisc in my project file (using hbide or manually doesn't
change something)
I have modified group and owner from alain to root, but it doesn't
change anything.

I have this message :

'/tmp/hbmk_lkqu8n.dir/wordstat.o' '/tmp/hbmk_lkqu8n.dir/wrdplace.o'
'/tmp/hbmk_lkqu8n.dir/wselect.o' '/tmp/hbmk_lkqu8n.dir/hbmk_vy2uko.o'
-Wl,--start-group -l'libhbmisc' -l'hbcplr' -l'hbdebug' -l'gpm'
-l'harbour' -Wl,--end-group -o'/opt/TuxPrograms/ClipWord/clipword'
-L'/usr/local/lib/harbour'

/usr/bin/ld: cannot find -llibhbmisc
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc '/tmp/hbmk_lkqu8n.dir/abandon.o' '/tmp/hbmk_lkqu8n.dir/affigril.o'
'/tmp/hbmk_lkqu8n.dir/aide.o' '/tmp/hbmk_lkqu8n.dir/attrchar.o'
'/tmp/hbmk_lkqu8n.dir/boite.o' '/tmp/hbmk_lkqu8n.dir/casblack.o'
'/tmp/hbmk_lkqu8n.dir/clearkey.o' '/tmp/hbmk_lkqu8n.dir/clipscreen.o'
'/tmp/hbmk_lkqu8n.dir/clipword.o' '/tmp/hbmk_lkqu8n.dir/corriger.o'
'/tmp/hbmk_lkqu8n.dir/cw10x10.o' '/tmp/hbmk_lkqu8n.dir/cw10x15.o'
'/tmp/hbmk_lkqu8n.dir/cw15x15.o' '/tmp/hbmk_lkqu8n.dir/cw15x20.o'
'/tmp/hbmk_lkqu8n.dir/cw20x20.o' '/tmp/hbmk_lkqu8n.dir/cwbase.o'
'/tmp/hbmk_lkqu8n.dir/cwindex.o' '/tmp/hbmk_lkqu8n.dir/cwutil.o'
'/tmp/hbmk_lkqu8n.dir/defedit.o' '/tmp/hbmk_lkqu8n.dir/errorsys.o'
'/tmp/hbmk_lkqu8n.dir/fabdef.o' '/tmp/hbmk_lkqu8n.dir/griprint.o'
'/tmp/hbmk_lkqu8n.dir/gristat.o' '/tmp/hbmk_lkqu8n.dir/helpinit.o'
'/tmp/hbmk_lkqu8n.dir/hb_debug.o' '/tmp/hbmk_lkqu8n.dir/importe.o'
'/tmp/hbmk_lkqu8n.dir/inidef.o' '/tmp/hbmk_lkqu8n.dir/iniprd.o'
'/tmp/hbmk_lkqu8n.dir/loadcwf.o' '/tmp/hbmk_lkqu8n.dir/makecwf.o'
'/tmp/hbmk_lkqu8n.dir/modele.o' '/tmp/hbmk_lkqu8n.dir/modniv.o'
'/tmp/hbmk_lkqu8n.dir/okall.o' '/tmp/hbmk_lkqu8n.dir/parmgril.o'
'/tmp/hbmk_lkqu8n.dir/pavcurs.o' '/tmp/hbmk_lkqu8n.dir/pg_menu.o'
'/tmp/hbmk_lkqu8n.dir/playinit.o' '/tmp/hbmk_lkqu8n.dir/playstat.o'
'/tmp/hbmk_lkqu8n.dir/printfile.o' '/tmp/hbmk_lkqu8n.dir/putkey.o'
'/tmp/hbmk_lkqu8n.dir/sayhelp.o' '/tmp/hbmk_lkqu8n.dir/saytime.o'
'/tmp/hbmk_lkqu8n.dir/screen.o' '/tmp/hbmk_lkqu8n.dir/setform.o'
'/tmp/hbmk_lkqu8n.dir/setprint.o' '/tmp/hbmk_lkqu8n.dir/sizecurs.o'
'/tmp/hbmk_lkqu8n.dir/solprint.o' '/tmp/hbmk_lkqu8n.dir/strdate.o'
'/tmp/hbmk_lkqu8n.dir/svgrille.o' '/tmp/hbmk_lkqu8n.dir/svjoueur.o'
'/tmp/hbmk_lkqu8n.dir/wordedit.o' '/tmp/hbmk_lkqu8n.dir/wordstat.o'
'/tmp/hbmk_lkqu8n.dir/wrdplace.o' '/tmp/hbmk_lkqu8n.dir/wselect.o'
'/tmp/hbmk_lkqu8n.dir/hbmk_vy2uko.o' -Wl,--start-group -l'libhbmisc'
-l'hbcplr' -l'hbdebug' -l'gpm' -l'harbour' -Wl,--end-group
-o'/opt/TuxPrograms/ClipWord/clipword' -L'/usr/local/lib/harbour'

----------------------------------------------------------------------------------------------------
Exit Code [ 7 ] Exit Status [ 0 ] Finished at [ 13:17:23 ] Done in [
5.25 Secs ]
----------------------------------------------------------------------------------------------------

I suppose I must launch a ld command with some parameters ?
If somebody can help me.

Thanks

A+


Alex Strickland

unread,
Oct 22, 2010, 7:53:44 AM10/22/10
to harbou...@googlegroups.com
On 2010/10/22 01:53 PM, Qatan wrote:

>> The license is not suitable for commercial work.
>
> Are you sure?

I'm pretty sure, if this is authoritative it is pretty clear:

http://www.wikivs.com/wiki/GPL_vs_LGPL say:

GPL and LGPL (GNU General Public License and GNU Lesser General Public
License) are licenses meant to be used in Open Source Software. Both are
created by the GNU Project.
GPL and LGPL protects software and all derivative software from having
their source code hidden from the public. GPL takes the strong stance,
saying that all software that uses the GPL software must itself be open
sourced. This is known as a "reciprocal license" and makes it impossible
for proprietary software developers to use GPL'ed code. In contrast,
LGPL provides an exception to the usage and distribution of the
software, allowing for non-free products to include the LGPL'ed
software. In the GNU Project's own words: "using the Lesser GPL permits
use of the library in proprietary programs; using the ordinary GPL for a
library makes it available only for free programs." [1]

--
Alex

David MS

unread,
Oct 22, 2010, 8:02:26 AM10/22/10
to Harbour Users
Hi Qatan,

> I am not sure I understood but I belive it would work as well:
>
> Font solution:
> 1) select the font: HPDF_Page_SetFontAndSize( page, font, size )
> 2) print the string: HPDF_Page_TextOut( page, col, lin, string )
>

no, with font solution will be something like this:

2) print the string: HPDF_Page_TextOut( page, col, lin,
Stringto128C(string) )

> Rectangle solution (just an example):
> 1) execute a function:
> HPDF_Page_DrawImage( page, CreateBarCodeImage( string ), col, lin, sizeup,
> sizeright  )
>
> In both cases you will have "string".
>

No, with the font solution you can find the string resulting from the
encoding because they continue being letters and numbers. With the
solution of the rectangles you just have drawings.

>
> Well, not sure again but the string must to be transfored in other code to
> be printed as Barcode.
> Example: 123123123123123 will look like: �,?7,?7,�3�� so it will correspond
> to the barcode fonts that represent the string 123123123123123.

Yes, but you can serach for "�,?7,?7,�3��" . In the pdf with
rectangles you can´t
It depends de codebar you use, in this case we search for
Stringto128C("123123123123123") if you use other codification i.e
codebar 39 you can search for "123123123123123" directly.

I hope help you.
Best Regards,
David

Qatan

unread,
Oct 22, 2010, 9:22:29 AM10/22/10
to harbou...@googlegroups.com
Hello David,

>> Font solution:
>> 1) select the font: HPDF_Page_SetFontAndSize( page, font, size )
>> 2) print the string: HPDF_Page_TextOut( page, col, lin, string )
>>
>no, with font solution will be something like this:
>
>2) print the string: HPDF_Page_TextOut( page, col, lin,
>Stringto128C(string) )

Right! I forgot to put that function that I call "encoder" (may be other
name)


>> Rectangle solution (just an example):
>> 1) execute a function:
>> HPDF_Page_DrawImage( page, CreateBarCodeImage( string ), col, lin,
>> sizeup,
>> sizeright )
>>
>> In both cases you will have "string".
>>
>
>No, with the font solution you can find the string resulting from the
>encoding because they continue being letters and numbers. With the
>solution of the rectangles you just have drawings.

OK, I agree.


>>
>> Well, not sure again but the string must to be transfored in other code
>> to
>> be printed as Barcode.

>> Example: 123123123123123 will look like: �,?7,?7,�3�� so it will


>> correspond
>> to the barcode fonts that represent the string 123123123123123.
>

>Yes, but you can serach for "�,?7,?7,�3��" . In the pdf with


>rectangles you can�t
>It depends de codebar you use, in this case we search for
>Stringto128C("123123123123123") if you use other codification i.e
>codebar 39 you can search for "123123123123123" directly.

Now I understand and agree with your technical point although it is not
important in my specific case (may be important to others, of course). I
would use the other solution, like printing the string under the barcode
image. It would be codebar independant (no encoded strings) and would work
even better for PDF searching (if it would be the case).


>I hope help you.

Be assured of that. I am pleased to discuss the subject with you.
Thank you!

Qatan

Alain Aupeix

unread,
Oct 24, 2010, 1:00:28 PM10/24/10
to harbou...@googlegroups.com

Alain Aupeix

unread,
Oct 24, 2010, 1:15:33 PM10/24/10
to harbou...@googlegroups.com
Just to rename the thread ... trying


Dmitry Oleynikov

unread,
Oct 25, 2010, 6:54:01 AM10/25/10
to harbou...@googlegroups.com
Hi!

Can you see the Project Properties after doubleclick on project name
in Projects frame?
I can see correct Project Properties of active project from menu
Project -> Properties
If you did not open any project, that menu creates empty properties screen.

I am using Ubuntu.


2010/10/24 Alain Aupeix <alain....@wanadoo.fr>:

> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>

--
C уважением,

Дмитрий Олейников

Alain Aupeix

unread,
Oct 25, 2010, 12:07:51 PM10/25/10
to harbou...@googlegroups.com
Dmitry Oleynikov a écrit :

> Hi!
>
> Can you see the Project Properties after doubleclick on project name
> in Projects frame?
> I can see correct Project Properties of active project from menu
> Project -> Properties
> If you did not open any project, that menu creates empty properties screen.
>
> I am using Ubuntu.
>
The problem is not that I can't open project properties, it's that there
is 4 ways to do this:

1) right-click on the project name in Project tree << works
2) View >Project Properties in menu << works
3) click on Project properties in toolbar << works
4) Project > Properties in menu << doesn't work

After using 4), 1) and 2) doesn't work anymore, work again if 3) is then
used

So, it's a bug.

A+

Pritpal Bedi

unread,
Oct 25, 2010, 3:12:51 PM10/25/10
to Harbour Users
Hi

> The problem is not that I can't open project properties, it's that there
> is 4 ways to do this:
>
> 1) right-click on the project name in Project tree << works
> 2) View >Project Properties in menu << works
> 3) click on Project properties in toolbar << works
> 4) Project > Properties in menu << doesn't work
>
> After using 4), 1) and 2) doesn't work anymore, work again if 3) is then
> used
>
> So, it's a bug.

For sure yes.
You have described enough to know what is happening.
Will fix in a while.

Pritpal Bedi

Qatan

unread,
Oct 27, 2010, 8:09:43 PM10/27/10
to harbou...@googlegroups.com
Hello Alex,

I just deleted Zint from my PC. with such a license I don't want to
continue with it.
Anyway it is not the solution.
Seems that someone will have to create a harbour lib to draw bars for
barcode. (maybe myself but such a project is not for now).
Thanks for your help.
Regards,

Qatan

----- Original Message -----
From: "Alex Strickland" <ss...@mweb.co.za>
To: <harbou...@googlegroups.com>
Sent: Friday, 22 de October de 2010 08:53
Subject: Re: [harbour-users] Re: LibHaru - PDF with Barcode 128C

Alex Strickland

unread,
Oct 28, 2010, 4:07:28 AM10/28/10
to harbou...@googlegroups.com
On 2010/10/28 02:09 AM, Qatan wrote:

> Seems that someone will have to create a harbour lib to draw bars for
> barcode. (maybe myself but such a project is not for now).

The commercial product they reference looks quite good -
http://www.tec-it.com.

--
Alex

Message has been deleted

David MS

unread,
Nov 16, 2010, 4:13:50 AM11/16/10
to Harbour Users
You're welcome.

I tried it last Friday and was amazed,
I am following with great interest your post on the subject.
Now we have a real and practical alternative. Thanks to Mindaugas,
Vicktor and others.

Best Regards,
David.

On 15 nov 2011, 17:08, "Qatan" <wanstad...@gmail.com> wrote:
> Hello David,
>
>     Thanks for your great help.
>     It is not necessary any more.
>     Please check Mindaugas contribution "hbzebra" under
> \contrib\hbzebra\tests and compile the example: testhpdf.prg
>     That's what I was looking for! Works like a breeze for what I need.
>     Regards,
>
> Qatan
>
> ----- Original Message -----
> From: "David MS" <da...@gesintur.com>
> To: "Harbour Users" <harbou...@googlegroups.com>
> Sent: Wednesday, 20 de October de 2010 15:07
> Subject: [harbour-users] Re: LibHaru - PDF with Barcode 128C
>
> Qatan,
>
> That is the right way, what happens is that as I said in my previous
> post this library is very ""tiquismiquis" and not just the barcode
> fonts but many other fonts.
>
> You can test is the font has loaded with:
> font_name = HPDF_LoadTTFontFromFile( pdf, "c:\pdf
> \code128.ttf",HPDF_TRUE )
> def_font3 := HPDF_GetFont( pdf, font_name, "WinAnsiEncoding" )
>
> if Empty(font_name)
>    //Font not loaded
> endif
>
> Best Regards,
> David
>
> On 20 oct, 15:49, "Qatan" <wanstad...@gmail.com> wrote:
> > Hello David,
>
> > Yes, I agree with you.
> > I was trying to import the barcode font but without success.
> > Do you know how to use it?
> > I was trying something like:
>
> > font_name = HPDF_LoadTTFontFromFile( pdf, "c:\pdf\code128.ttf",
> > HPDF_TRUE )
> > def_font3 := HPDF_GetFont( pdf, font_name, "WinAnsiEncoding" )
>
> > Any help will be highly appreciated.
> > Regards,
>
> > Qatan
>
> > ----- Original Message -----
> > From: "David MS" <da...@gesintur.com>
> > To: "Harbour Users" <harbou...@googlegroups.com>
> > Sent: Wednesday, 20 de October de 2010 05:12
> > Subject: [harbour-users] Re: LibHaru - PDF with Barcode 128C
>
> > Qatan
>
> > The best way is use a barcode font.
>
> > Best Regard
> > David.
>
> > On 20 oct, 05:58, "Qatan" <wanstad...@gmail.com> wrote:
> > > Hello,
>
> > > Does anyone knows how to use the libHaruPDF to create a PDF with
> > > barcode?
>
> > > I found this on the libHaru dicution
> > > group:http://groups.google.com/group/libharu/browse_thread/thread/e538bde73...
>
> > > But I don t have any idea how to use it to create a barcode
>
> > > Any hits are wecolme.
>
> > > Qatan

Qatan

unread,
Nov 16, 2010, 4:03:33 AM11/16/10
to harbou...@googlegroups.com
Hello David,

Yes I am grateful for that nice tool too.
A week ago we didnt have a good solution but now we have it.
Its nice to see Harbour growing and becoming more usefull day by day.
Thanks to all those willing to help and to share their knowledge to help
this project.

Jano Crema

unread,
Feb 5, 2015, 5:12:42 PM2/5/15
to harbou...@googlegroups.com

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include "hpdf.h"

jmp_buf env3;
#ifdef HPDF_DLL
void  __stdcall
#else
void
#endif

error_handler (HPDF_STATUS   error_no, HPDF_STATUS   detail_no, void *user_data) {

    printf("ERROR: error_no=%04X, detail_no=%u\n", (HPDF_UINT)error_no,(HPDF_UINT)detail_no);
    longjmp(env3, 1);
}
int combinacao[106][6]= {{2,1,2,2,2,2},{2,2,2,1,2,2},{2,2,2,2,2,1},{1,2,1,2,2,3},{1,2,1,3,2,2},{1,3,1,2,2,2},{1,2,2,2,1,3},
    {1,2,2,3,1,2},{1,3,2,2,1,2},{2,2,1,2,1,3},{2,2,1,3,1,2},{2,3,1,2,1,2},{1,1,2,2,3,2},{1,2,2,1,3,2},{1,2,2,2,3,1},{1,1,3,2,2,2},
    {1,2,3,1,2,2},{1,2,3,2,2,1},{2,2,3,2,1,1},{2,2,1,1,3,2},{2,2,1,2,3,1},{2,1,3,2,1,2},{2,2,3,1,1,2},{3,1,2,1,3,1},{3,1,1,2,2,2},
    {3,2,1,1,2,2},{3,2,1,2,2,1},{3,1,2,2,1,2},{3,2,2,1,1,2},{3,2,2,2,1,1},{2,1,2,1,2,3},{2,1,2,3,2,1},{2,3,2,1,2,1},{1,1,1,3,2,3},
    {1,3,1,1,2,3},{1,3,1,3,2,1},{1,1,2,3,1,3},{1,3,2,1,1,3},{1,3,2,3,1,1},{2,1,1,3,1,3},{2,3,1,1,1,3},{2,3,1,3,1,1},{1,1,2,1,3,3},
    {1,1,2,3,3,1},{1,3,2,1,3,1},{1,1,3,1,2,3},{1,1,3,3,2,1},{1,3,3,1,2,1},{3,1,3,1,2,1},{2,1,1,3,3,1},{2,3,1,1,3,1},{2,1,3,1,1,3},
    {2,1,3,3,1,1},{2,1,3,1,3,1},{3,1,1,1,2,3},{3,1,1,3,2,1},{3,3,1,1,2,1},{3,1,2,1,1,3},{3,1,2,3,1,1},{3,3,2,1,1,1},{3,1,4,1,1,1},
    {2,2,1,4,1,1},{4,3,1,1,1,1},{1,1,1,2,2,4},{1,1,1,4,2,2},{1,2,1,1,2,4},{1,2,1,4,2,1},{1,4,1,1,2,2},{1,4,1,2,2,1},{1,1,2,2,1,4},
    {1,1,2,4,1,2},{1,2,2,1,1,4},{1,2,2,4,1,1},{1,4,2,1,1,2},{1,4,2,2,1,1},{2,4,1,2,1,1},{2,2,1,1,1,4},{4,1,3,1,1,1},{2,4,1,1,1,2},
    {1,3,4,1,1,1},{1,1,1,2,4,2},{1,2,1,1,4,2},{1,2,1,2,4,1},{1,1,4,2,1,2},{1,2,4,1,1,2},{1,2,4,2,1,1},{4,1,1,2,1,2},{4,2,1,1,1,2},
    {4,2,1,2,1,1},{2,1,2,1,4,1},{2,1,4,1,2,1},{4,1,2,1,2,1},{1,1,1,1,4,3},{1,1,1,3,4,1},{1,3,1,1,4,1},{1,1,4,1,1,3},{1,1,4,3,1,1},
    {4,1,1,1,1,3},{4,1,1,3,1,1},{1,1,3,1,4,1},{1,1,4,1,3,1},{3,1,1,1,4,1},{4,1,1,1,3,1},{2,1,1,4,1,2},{2,1,1,2,1,4},{2,1,1,2,3,2}};
//1-Branco 0-Preto
void imprimeBarra(HPDF_Page page,  int cor, float x, float y){
    HPDF_Page_SetRGBStroke (page, cor, cor, cor);
    HPDF_Page_MoveTo (page, x, y);
    HPDF_Page_LineTo (page, x , y + 20);
    HPDF_Page_Stroke (page);
}

void geraCodigo(HPDF_Page page, const char *numero[],int tamanho) {
    int i,j;
    float k=100;
    int b1,b2,b3;
    int s1,s2,s3;
    //Pegar dv
    long int verificador=105;
    for(i=1;i<=tamanho-1;i++){
        verificador=verificador+(atoi(numero[i])*i);
    }
    printf("TOTAL=%ld",verificador);
    int dv=verificador%103;
    printf("DV=%d",dv);

    for(i=0;i<tamanho;i++){
        b1=combinacao[atoi(numero[i])][0];
        for(j=0;j<b1;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s1=combinacao[atoi(numero[i])][1];
        for(j=0;j<s1;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b2=combinacao[atoi(numero[i])][2];
        for(j=0;j<b2;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s2=combinacao[atoi(numero[i])][3];
        for(j=0;j<s2;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b3=combinacao[atoi(numero[i])][4];
        for(j=0;j<b3;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s3=combinacao[atoi(numero[i])][5];
        for(j=0;j<s3;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
    }
    //DV
        b1=combinacao[dv][0];
        for(j=0;j<b1;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s1=combinacao[dv][1];
        for(j=0;j<s1;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b2=combinacao[dv][2];
        for(j=0;j<b2;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s2=combinacao[dv][3];
        for(j=0;j<s2;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b3=combinacao[dv][4];
        for(j=0;j<b3;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s3=combinacao[dv][5];
        for(j=0;j<s3;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
    //TERMINADOR
        b1=2;
        for(j=0;j<b1;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s1=3;
        for(j=0;j<s1;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b2=3;
        for(j=0;j<b2;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s2=1;
        for(j=0;j<s2;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        b3=1;
        for(j=0;j<b3;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
        s3=1;
        for(j=0;j<s3;j++,k=k+0.7){
                imprimeBarra(page,1,k,700);
        }
        int b4=2;
        for(j=0;j<b4;j++,k=k+0.7){
                imprimeBarra(page,0,k,700);
        }
}

int main(int argc, char *argv[]) {
    HPDF_Doc  pdf;
    char fname[256];
    HPDF_Page page;
    HPDF_Font font;
    strcpy (fname, "teste.pdf");
    pdf = HPDF_New (error_handler, NULL);
    if (!pdf) {
        printf ("error: cannot create PdfDoc object\n");
        return  0;
    }
    if (setjmp(env3)) {
        HPDF_Free (pdf);
        return  0;
    }
    page = HPDF_AddPage (pdf);
    font= HPDF_GetFont(pdf, "Times-Roman", "WinAnsiEncoding" );
    HPDF_Page_SetFontAndSize (page, font, 10);
    HPDF_SetCompressionMode (pdf, HPDF_COMP_ALL);
    HPDF_SetPageMode (pdf, HPDF_PAGE_MODE_USE_OUTLINE);
    HPDF_Page_SetSize (page, HPDF_PAGE_SIZE_A4 , HPDF_PAGE_PORTRAIT);
    HPDF_Page_SetLineWidth(page,0.8);
   //105 is start code, 

    const char *numero[]={"105","41","15","01", "03", "91", "94", "70", "00", "01", "41", "55", "00", "10", "00", "00", "00", "74", "10", "00", "00", "07", "40"};
    geraCodigo(page,numero,23);

    HPDF_SaveToFile (pdf, fname);
    HPDF_Free (pdf);
    system(fname);
    return 0;
}


Em quarta-feira, 20 de outubro de 2010 01:58:42 UTC-2, Qatan escreveu:
Hello,
 
    Does anyone knows how to use the libHaruPDF to create a PDF with barcode?
 

Clebson Derivan

unread,
Oct 29, 2015, 10:45:32 AM10/29/15
to Harbour Users
sweet ! gonna try your code Jano.

brasileiro ? os nomes das funcoes estao em portugues ;)
Reply all
Reply to author
Forward
0 new messages