Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

RE: [iText-questions] Mailing labels

Bill Ensley

2005-06-28

Replies:

Avery themselves have the measurements available, but
the best thing to do ( I think anyway, we use it everyday ) is
to use PdfGraphics2D and loop through the rows and cols
and translate the graphics object therefore not requiring
the knowledge of each x,y coordinate:

int top = labelSheet.top;
int left = labelSheet.left;
for(int r=0;r<rows;r++){
for(int c=0;c<cols;c++){
 g.translate(left, top);
 doPaint(g);
 top += label.height + label.gap;
}
left += label.width + label.gap
}

This is very simple to implement if you know your label measurements.

Bill Ensley
Bear Printing

> -----Original Message-----
> From: itext-questions-admin@(protected)
> [mailto:itext-questions-admin@(protected)
> Lowagie
> Sent: Tuesday, June 28, 2005 8:29 AM
> To: Jay Parashar
> Cc: 'itext-questions@(protected)'
> Subject: Re: [iText-questions] Mailing labels
>
>
> Jay Parashar wrote:
>
> >I wanted some helping in generating mailing labels (Avery 5260).
> Any idea,
> >code examples, how to achieve that?
> >
> Where can one find the specs of Avery Labels?
> I found sites selling the labels, describing the size of a label,
> but I didn't find the margins needed, etc...
> br,
> Bruno
>
>
> -------------------------------------------------------
> 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
> iText-questions@(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
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
©2008 junlu.com - Jax Systems, LLC, U.S.A.