Image img = bc.createImageWithBarcode(contentByte, Color.BLACK, Color.BLACK);
 img.setRotation((float)Math.toRadians(45));
 img.setAbsolutePosition(100, 100);
 template.addImage(img);

Paulo

 
________________________________

De: [EMAIL PROTECTED] em nome de CG
Enviada: sex 08-Set-06 19:36
Para: Post all your questions about iText here
Assunto: [iText-questions] Image.setRotation seems to be broken...



...in this context at least...

try {

 String text = "FOO";
 float barHeight = 20f;
 float barWidth = 1f;

 Barcode39 bc = new Barcode39();
 bc.setCode(text);
 bc.setStartStopText(false);
 bc.setChecksumText(false);
 bc.setAltText("");
 bc.setBarHeight(barHeight);
 bc.setX(barWidth);

 Image img = bc.createImageWithBarcode(contentByte, Color.BLACK, Color.BLACK);
 img.setAlignment(Image.ALIGN_MIDDLE);
 img.setRotation((float)Math.toRadians(45));
 template.addImage(img, img.scaledWidth(), 0, 0, img.scaledHeight(), 100,100);
} catch (Exception e) {
 e.printStackTrace();
}

My goal is to rotate the barcode. I'm working with templates and direct
content. I don't think PdfTemplate.addImage pays attention to this image's 
rotation.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions




Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.

<<winmail.dat>>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to