Hi, i've been wrestling with java 1.2 printing api for a while now, and
i can no longer print Text using a Graphics2D context under Linux
(RedHat 6.1). I can print everything but text, i can print images and
other graphics... i must be missing something simple, but i've checked
tons of docs and i can't find anything...
here's what i've been using.. can someone please tell me what i'm
doing wrong?
thanks,
nic
public int print(Graphics g, PageFormat pf, int pi) throws
PrinterException
{
if (pi>=1) {
return Printable.NO_SUCH_PAGE;
}
Graphics2D g2 = (Graphics2D)g;
g2.translate(pf.getImageableX(),pf.getImageableY());
g2.setColor(Color.black);
g2.setFont(new Font("Arial",Font.PLAIN,24));
System.out.println(g2.getFont());
g2.setPaint(Color.black);
g2.drawString("Please Print",0,0);
return Printable.PAGE_EXISTS;
}
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".