Hi Olivier.
For our label/report generation we do draw the barcodes rather than use a Form.
Actually we have a Canvas that adapts to generate PDF so it is all WYSIWYG.
Therefore no actual dependency in the PDF generation to any barcode objects.
Looking to support Arefact instead of the stuff we have. Not looked at the
details of Artefact yet though.
TTF in PDF is not so bad... a snippet of what's expected in the output:
6 0 obj
<<
/Type /Font
/Subtype /TrueType
/BaseFont /Arial
/FirstChar 0
/LastChar 255
/Widths 8 0 R
/FontDescriptor 9 0 R
/Encoding /WinAnsiEncoding
>>
endobj
9 0 obj
<<
/Type /FontDescriptor
/FontName /Arial
/Flags 32
/FontBBox [-665 -325 2000 1005]
/Ascent 905
/Descent -212
/Leading 0
/ItalicAngle 0
>>
endobj
8 0 obj
[ 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750
750 750 750 750 750 750 750 750 750 750 750 750 750 277 277 354 556 556 889 666
190 333 333 389 583 277 333 277 277 556 556 556 556 556 556 556 556 556 556 277
277 583 583 583 556 1015 666 666 722 722 666 610 777 722 277 500 666 556 833
722 777 666 777 722 666 610 722 666 943 666 666 610 277 277 277 469 556 333 556
556 500 556 556 277 556 556 222 222 500 222 833 556 556 556 556 333 500 277 556
500 722 500 500 500 333 259 333 583 750 750 750 750 750 750 750 750 750 750 750
750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750
750 750 277 333 556 556 556 556 259 556 333 736 370 556 583 333 736 552 399 548
333 333 333 576 537 333 333 333 365 556 833 833 833 610 666 666 666 666 666 666
1000 722 666 666 666 666 277 277 277 277 722 722 777 777 777 777 777 583 777
722 722 722 722 666 666 610 556 556 556 556 556 556 889 500 556 556 556 556 277
277 277 277 556 556 556 556 556 556 556 548 610 556 556 556 556 500 556 500 ]
endobj
(actually we now use MacRoman encoding as generally works better).
All the data there can be gatherted from the FreeType TTF font in Pharo. Just
needs to be present on the end-user's pc.
A typical PDF reader will do fallbacks as necessary if not present.
(not tackled fully embedded fonts yet).
Regards, Gary
----- Original Message -----
From: Olivier Auverlot
To: Pharo Development List
Sent: Wednesday, June 19, 2013 6:42 AM
Subject: Re: [Pharo-dev] Barcodes
Hi Gary,
yes, I'm interested by help and pointers about TTF. It's a planned evolution
of Artefact.
About barcodes generation, why don't use Artefact directly ? You can draw
barcodes with the PDFDraw elements (PDFLineElement, PDFRectElement, etc.) and
print the document on stickers.
In the future, it could be cool to have a Artefact-Elements-Barcodes package
:)
Best regards
Olivier
Le 18 juin 2013 à 18:37, Gary Chambers a écrit :
Well, hoping to work with Torsten on barcodes in general, given we have
support for canvas based drawing of a few formats here at Pinesoft.
Also, if Olivier would like some help with TTF in PDFs I can give some
pointers etc.
Regards, Gary
----- Original Message -----
From: Chris Cunningham
To: Pharo Development List
Sent: Tuesday, June 18, 2013 5:23 PM
Subject: Re: [Pharo-dev] Barcodes
You should be able to create a form, paint it white, draw on it with a
barcode TTF font, export that form to JPEG, and then use that JPEG into
Artefact.
Not really straight-forward, but it should work.
*Note: I've found that writing JPEG's in Pharo, it assumes that the
background is BLACK if it isn't isn't specifically painted with something else
first. Unlike PNG and GIF, which assume WHITE.
-Chris
On Tue, Jun 18, 2013 at 1:44 AM, Olivier Auverlot
<[email protected]> wrote:
Hi Torsten,
Artefact don't support TTF fonts for the moment but it's planned in
futures versions.
Best regards
Olivier :-)
Le 14 juin 2013 à 16:16, Milan Mimica a écrit :
You just need a TTF font. Does Artefact support TTF? hpdf does.
On 14 June 2013 13:58, Torsten Bergmann <[email protected]> wrote:
Do we have some barcode stuff available for Pharo?
Something "Form" based that can be used with Artefact?
Thx
T.
--
Milan Mimica
http://sparklet.sf.net