Here is the class:
http://www.datavirtue.com/Software/dev/PDFLabels.java
Here is a method to use it;
public static void main(String[] args) {
PDFLabels pl = new PDFLabels (1.0f, 2.6f, .16f, .50f,
.17f,"c:\\labels.pdf"); //5160 || 8160
//PDFLabels pl = new PDFLabels (1.33f, 4.0f, .16f, .83f,
.17f,"c:\\labels.pdf"); //5162
//PDFLabels pl = new PDFLabels (1.0f, 4.0f, .16f, .50f,
.17f,"c:\\labels.pdf"); //5161
//PDFLabels pl = new PDFLabels (1.5f, 4.0f, .13f, .25f,
.13f,"c:\\labels.pdf"); //5159
//PDFLabels pl = new PDFLabels (.75f, 2.25f, .38f, .63f,
.5f,"c:\\labels.pdf"); //3261R
for (int i = 0; i < 10; i++){
for (int r = 0; r < 6; r++){
/*pl.add(new String ((String)tm.getValueAt(r,2) +
(String)tm.getValueAt(r,3)+ nl +
(String)tm.getValueAt(r,4)+ nl + " " +
(String)tm.getValueAt(r,5) + nl +
(String)tm.getValueAt(r,6) +", "+
(String)tm.getValueAt(r,7) +" "+
(String)tm.getValueAt(r,8)) );
*/
String text = "TEST TEXT";
pl.setAlignment(9,1); //unchanged - center
//pl.add(text); //adds a regular label
pl.appendPostnet(text, "45140"); //regular label with barcode
(inserts nested table))
}
}
if (pl.finnish()) System.out.println("Success!");
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/