[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Printing Barcodes from Ruby

List Recv

7/17/2006 8:22:00 AM

I'd like to be able to generate barcodes from Ruby (to a PDF document).
What is the best way to do this?

Does it suffice to just get some barcode fonts, and use those, or do I
need special libs? Any help appreciated.

13 Answers

OliverMarchand

7/17/2006 8:53:00 AM

0

I suggest to:

- install GNU barcode from
http://www.gnu.org/software/barcode/ba...
- use Latex to import postscript files generated by GNU barcode
- use ruby to glue those tools

have fun,
Oliver

listrecv@gmail.com schrieb:

> I'd like to be able to generate barcodes from Ruby (to a PDF document).
> What is the best way to do this?
>
> Does it suffice to just get some barcode fonts, and use those, or do I
> need special libs? Any help appreciated.

Csaba Henk

7/17/2006 2:05:00 PM

0

On 2006-07-17, OliverMarchand <oliver.marchand@gmail.com> wrote:
> - install GNU barcode from
> http://www.gnu.org/software/barcode/ba...
> - use Latex to import postscript files generated by GNU barcode
> - use ruby to glue those tools

You might as well try to use GrailTeX (

http://tipogral.hu/index.rbx/site/project...

), a new, compact, web-centric TeX distribution with support for
package management (for the TeX/CTAN packages included). It comes with
everything you need for barcode generation, as the online demo on the
referred page shows.

Regards,
Csaba

Bojan Mihelac

7/17/2006 3:41:00 PM

0

listrecv@gmail.com wrote:
> I'd like to be able to generate barcodes from Ruby (to a PDF document).
> What is the best way to do this?
>
> Does it suffice to just get some barcode fonts, and use those, or do I
> need special libs? Any help appreciated.
>
>
>
>
>
I think you can embed some font (I am not sure what is name of font) to
PDF and write directly in it.

best regards,
Bojan

--
Bojan Mihelac
Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.m...

Christian Neukirchen

7/17/2006 3:51:00 PM

0

Csaba Henk <csaba@phony_for_avoiding_spam.org> writes:

> On 2006-07-17, OliverMarchand <oliver.marchand@gmail.com> wrote:
>> - install GNU barcode from
>> http://www.gnu.org/software/barcode/ba...
>> - use Latex to import postscript files generated by GNU barcode
>> - use ruby to glue those tools
>
> You might as well try to use GrailTeX (
>
> http://tipogral.hu/index.rbx/site/project...
>
> ), a new, compact, web-centric TeX distribution with support for
> package management (for the TeX/CTAN packages included). It comes with
> everything you need for barcode generation, as the online demo on the
> referred page shows.

Awesome stuff, thanks a lot!

> Regards,
> Csaba
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...

List Recv

7/17/2006 5:14:00 PM

0


Bojan Mihelac wrote:
> I think you can embed some font (I am not sure what is name of font) to
> PDF and write directly in it.

That would certainly be the easiest - easier than converting from
PostScript. I could do the whole thing as a PDF form.

Does anyone know more about this?

Also, does anyone know if there are any libs with Ruby bindings which
can apply a FDF/XFDF to a PDF? (I don't think Pdf::Writer can - am I
correct?)

Bojan Mihelac

7/17/2006 7:39:00 PM

0

listrecv@gmail.com wrote:
> Bojan Mihelac wrote:
>> I think you can embed some font (I am not sure what is name of font) to
>> PDF and write directly in it.
>
> That would certainly be the easiest - easier than converting from
> PostScript. I could do the whole thing as a PDF form.
>
> Does anyone know more about this?
>
> Also, does anyone know if there are any libs with Ruby bindings which
> can apply a FDF/XFDF to a PDF? (I don't think Pdf::Writer can - am I
> correct?)
>
>
>
>
>
I see there are plenty of barcode Code 39 true type fonts available and
some are free as well a litle googling would do.

I had some troubles embeding fonts with Pdf::Writer so please write if
you get it working with Pdf::Writer.




--
Bojan Mihelac
Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.m...

Rob Kaufman

7/17/2006 9:24:00 PM

0

Right now we're using the method described here ->
http://wiki.rubyonrails.org/rails/pages/HowtoGe... under the
heading PDF Form Fill. It calls pdftk externally, it is not a ruby
binding or anything. Don't be put off by this being a Rails link, the
technique works just fine without Rails installed.

Rob Kaufman

On 7/17/06, listrecv@gmail.com <listrecv@gmail.com> wrote:
>
> Bojan Mihelac wrote:
> > I think you can embed some font (I am not sure what is name of font) to
> > PDF and write directly in it.
>
> That would certainly be the easiest - easier than converting from
> PostScript. I could do the whole thing as a PDF form.
>
> Does anyone know more about this?
>
> Also, does anyone know if there are any libs with Ruby bindings which
> can apply a FDF/XFDF to a PDF? (I don't think Pdf::Writer can - am I
> correct?)
>
>
>

List Recv

7/18/2006 6:06:00 AM

0


Rob Kaufman wrote:
> Right now we're using the method described here ->
> http://wiki.rubyonrails.org/rails/pages/HowtoGe... under the
> heading PDF Form Fill. It calls pdftk externally, it is not a ruby
> binding or anything. Don't be put off by this being a Rails link, the
> technique works just fine without Rails installed.


Rob,

I took a look at that. Looks good, except that FDF generator looks
very hackish. Is there a cleaner way of doing this, perhaps using
XFDF?

(Also, how did you generate the PDF initially - just using a word
processor, and adding form fields in Acrobat?)

Rob Kaufman

7/18/2006 8:49:00 PM

0

I agree with you that the create_fdf method is kind of a "magic" hack,
but it allows you to very simply take hash data to fill in a form.
I'll be honest, though I understand how it works, I didn't create this
method or do much to change it. Using pdftk makes a lot of since to
me, since leveraging a separate tool increases the debugging base.

We're using Acrobat to create our form template.

Rob Kaufman

On 7/17/06, listrecv@gmail.com <listrecv@gmail.com> wrote:
>
> Rob Kaufman wrote:
> > Right now we're using the method described here ->
> > http://wiki.rubyonrails.org/rails/pages/HowtoGe... under the
> > heading PDF Form Fill. It calls pdftk externally, it is not a ruby
> > binding or anything. Don't be put off by this being a Rails link, the
> > technique works just fine without Rails installed.
>
>
> Rob,
>
> I took a look at that. Looks good, except that FDF generator looks
> very hackish. Is there a cleaner way of doing this, perhaps using
> XFDF?
>
> (Also, how did you generate the PDF initially - just using a word
> processor, and adding form fields in Acrobat?)
>
>
>

Guido Sohne

7/20/2006 9:02:00 PM

0

Probably not what you are looking for, but I wrote a barcode
(DataMatrix) generation thingy in JavaScript.

See http://sohne.n...

-- G.

On 7/17/06, listrecv@gmail.com <listrecv@gmail.com> wrote:
> I'd like to be able to generate barcodes from Ruby (to a PDF document).
> What is the best way to do this?
>
> Does it suffice to just get some barcode fonts, and use those, or do I
> need special libs? Any help appreciated.
>
>
>