You two options: a font or line stroking.
To use a font create a Type3 font with two chars '0' and '1'. Define char
'0' as a space with 1000 advance and char '1' as a rectangle 1000x1000 with
1000 advance. If the bit sequence was (assuming 1 bit == 1 byte):
byte[] b = {1,1,1,0,1,0,1};
The result would be:
cb.showText("1110101");
The other option is to use line stroking. Let's consider a 1x1 scaled space.
For the same bit sequence:
float y = 0.5f;
cb.setLineCap(PdfContentByte.LINE_CAP_BUTT);
cb.setLineWidth(1);
cb.moveTo(0, y);
cb.lineTo(3, y);
cb.moveTo(4, y);
cb.lineTo(5, y);
cb.moveTo(6, y);
cb.lineTo(7, y);
cb.stroke();
----- Original Message -----
From: "Gary Wu" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 31, 2005 1:04 AM
Subject: RE: [iText-questions] anti-aliasing and barcode
> Hi Paulo:
>
> Would it help if I print a PDF417 barcode as text in a PDF417 font? I
tested
> this idea and it seemed to work. I think this is because the barcode is
> printed as text, and printers only do anti-aliasing on images. As I was
> excited about the idea of printing PDF417 barcode as text, I couldn't find
> such feature in iText's BarcodePDF417 class. Am I right? What does it take
> to implement such a feature if I want to try?
>
> Thanks,
> Gary
>
>
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 30, 2005 3:26 AM
> To: Gary Wu; [email protected]
> Subject: Re: [iText-questions] anti-aliasing and barcode
>
> Only in the printer, it's a printer feature.
>
> ----- Original Message -----
> From: "Gary Wu" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Saturday, July 30, 2005 12:58 AM
> Subject: [iText-questions] anti-aliasing and barcode
>
>
> > Hi Group:
> >
> > I use BarcodePDF417 to generate a 2-D barcode and call its getImage
method
> > to get the barcode as an image. Everything is fine until I print the
image
> > (in a PDF file) to certain printers. Some printers will think the image
is
> > sampled as a low rate and therefore do anti-aliasing on it. The result
is
> > some gray areas in the printout. Is there a way to disable anti-aliasing
> so
> > that my barcode is printed in only black and white?
> >
> > Thanks,
> > Gary
> >
> >
> >
> > ====================
> > Notice to Recipient: This e-mail is meant for only the intended
recipient
> > of the transmission, and may be a communication privileged by law. If
you
> > received this e-mail in error, any review, use, dissemination,
> distribution,
> > or copying of this e-mail is strictly prohibited. Please notify us
> > immediately of the error by return e-mail and please delete this message
> > from your system. Applicable legal notices regarding the e-mail
content,
> > attachments, and web links are posted on Ellie Mae's website.
> > http://www.elliemae.com/legal.asp
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
> ====================
> Notice to Recipient: This e-mail is meant for only the intended recipient
> of the transmission, and may be a communication privileged by law. If you
> received this e-mail in error, any review, use, dissemination,
distribution,
> or copying of this e-mail is strictly prohibited. Please notify us
> immediately of the error by return e-mail and please delete this message
> from your system. Applicable legal notices regarding the e-mail content,
> attachments, and web links are posted on Ellie Mae's website.
> http://www.elliemae.com/legal.asp
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions