Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Page Size

 
Varuna Gunasekera
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to print a Fanfold ( 358 x 305 mm) page by setting java PageFormat with a Paper(1017,864). But the printer identified it as a A2 page and there for the paper height is too large for my requirement.

I the PageFormat with Paper(540,864) works fine for Fanfold ( 210 x 305 mm) paper and Printer too recognize it as a Fandfold 210x305mm.

Quick response is highly appriciated.

Thanks and Regards.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not advanced Java. Moving to Swing/AWT.
 
Chad Clites
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just for some clarification..It sounds like you have told your application what size to print the page, and are asking how to tell the printer to print it at that size?

Err... is that what the class is supposed to do? I don't understand your question completely, and the API is a bit unclear to me.
[ December 03, 2005: Message edited by: C Clites ]
 
Varuna Gunasekera
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What I am doing is Printing a JEditorPane with PrinterJob. I am setting the PageFormat of the PrinterJob with Paper(1017,864) which is equal to the Fanfold( 358 x 305 mm ) dimensions. But when I trace the print queue it seams that Printer is notified with A2 as its Page size. There for the form feed is not correctly done.
But the Paper(540,864) which is equal to the Fanfold (210x305mm) is correctly identified. Thank you for your reply.

Regards,
Varuna Gunasekera
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic