#1 2012-10-17 01:38:27

acrobatter
Member
Registered: 2012-10-16
Posts: 7

Embedding a TTF barcode font

Thanks for the software !

The TT font '3 of 9 barcode' works fine except when it is embedded, in which case the characters are displayed as boxes.

This happens using the metafile translation and when the rendering is straight onto the canvas.

Offline

#2 2012-10-17 11:32:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Embedding a TTF barcode font

If you have some code to be proposed, e.g. generating the barcode using regular TCanvas drawing methods, you are welcome!

Offline

#3 2012-10-17 11:49:20

acrobatter
Member
Registered: 2012-10-16
Posts: 7

Re: Embedding a TTF barcode font

ab wrote:

If you have some code to be proposed, e.g. generating the barcode using regular TCanvas drawing methods, you are welcome!

I was hoping there is some way the font could be embedded like other TT fonts. In the document properties the font is listed as '3of9barcode (embedded)'. But sadly, the barcode is not rendered.

Is it the font name that upsets things ?

Offline

#4 2012-10-17 12:08:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Embedding a TTF barcode font

Did you try with the latest version of the SynPDF library?
I guess the one you use is still the 1.15.

See also my remark http://synopse.info/forum/viewtopic.php?pid=5375#p5375

My only implementation concern is that it does use TPdfCanvas.TextOut() for text rendering, which is OK for non Unicode versions of Delphi, but is not Unicode-ready. They should have used TPdfCanvas.TextOutW() instead for Delphi 2009+.

Thanks indeed for your fair use!

Offline

#5 2012-10-17 12:39:05

acrobatter
Member
Registered: 2012-10-16
Posts: 7

Re: Embedding a TTF barcode font

ab wrote:

Did you try with the latest version of the SynPDF library?
I guess the one you use is still the 1.15.

See also my remark http://synopse.info/forum/viewtopic.php?pid=5375#p5375

My only implementation concern is that it does use TPdfCanvas.TextOut() for text rendering, which is OK for non Unicode versions of Delphi, but is not Unicode-ready. They should have used TPdfCanvas.TextOutW() instead for Delphi 2009+.

Thanks indeed for your fair use!

@ab,

I took careful note of your remarks. I'll try the latest version and make the necessary changes.

Thank you for the advice and the approbation.

(The latest versions page lists 1.15 as the current revision. Where can I get the later one you refer to ?)

Last edited by acrobatter (2012-10-17 12:57:06)

Offline

#6 2012-10-17 13:23:29

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Embedding a TTF barcode font

You can get the files from mORMot itself.
http://synopse.info/fossil/wiki?name=Downloads
Current is 1.17.

Or even better then "unstable" version from http://synopse.info/fossil/wiki?name=Get+the+source
A potential GPF issue has been fixed in TPdfWrite.AddUnicodeHex and TPdfWrite.AddHex since 1.17.

Offline

#7 2012-10-18 17:09:21

acrobatter
Member
Registered: 2012-10-16
Posts: 7

Re: Embedding a TTF barcode font

Thank you.

The later version did not help, but I think it is likely that this problem is because the font is non-standard in some way. We've found a way around the problem now so it is not a hold up anymore.

Offline

#8 2014-01-23 03:16:06

makaveiljojo
Member
Registered: 2013-12-31
Posts: 2

Re: Embedding a TTF barcode font

Hi, acrobatter, sorry to continue an old thread.
But I think need ur help.
I used a code 39 Excel add-in to generate barcode images in the spreadsheet. It worked fine but I have no idea how to transfer all those barcode into PDF files.
Or I have to get barcode font to complete it?

Offline

Board footer

Powered by FluxBB