aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Java Page Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java Page Size" Watch "Java Page Size" New topic
Author

Java Page Size

Varuna Gunasekera
Greenhorn

Joined: Nov 14, 2005
Posts: 5
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

This is not advanced Java. Moving to Swing/AWT.


[Jess in Action][AskingGoodQuestions]
Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
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

Joined: Nov 14, 2005
Posts: 5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Page Size