• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error printing String via Java Print Services  RSS feed

 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ranchers!

I'm trying to send a simple String to the printer and it's not playing nice. My test program runs without error, but when I run "lpstat -t"
and check the printer's status...


printer Infoserv now printing Infoserv-0. enabled since Thu 16 May 2013 01:25:40 PM EDT
This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!


Nothing prints and the job hangs in the queue.

I Googled "Adobe Document Structuring Conventions" to no avail. :-(

Here is my program.


 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I found an alternate solution.

I implemented java.awt.print.Printable and used DocFlavor.SERVICE_FORMATTED.PRINTABLE. This allowed me to use the Graphics object in the print() function.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!