Re: [JAVA2D] How to set custom paper size using printer jobs

2007-12-20 Thread java2d
THANKS FOR POSTING THIS! You have saved me many hours of debugging! [Message sent by forum member 'snacker' (snacker)] http://forums.java.net/jive/thread.jspa?messageID=251048 === To unsubscribe, send email to [EMAIL

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-11-30 Thread java2d
I think you forgot to add paper size to printer server. Try to do follow this tutorial http://it-develops.blogspot.com/2007/10/cnet-connect-with-mysql.html [Message sent by forum member 'kanatorn' (kanatorn)] http://forums.java.net/jive/thread.jspa?messageID=248090

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-11-29 Thread java2d
Hi I had the same problem with default paper with my software for printing labels. Finally I discovered that using the Book class can help. When I used the standard way the paper always changed to some default size and the imaginable area was also wrong. greetings from Poland here is my class

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-11-20 Thread java2d
Sorry is I Have de same problem, but when I’m in Netbeans and run the program the code work, but when I’m compile the system and make my *.exe don't work. Some vary cant tell me why. [Message sent by forum member 'janet_batlle' (janet_batlle)]

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-11-09 Thread java2d
I Have de same problem, but when I’m in Netbeans and run the program the code work, but when I’m compile the system and make my *.exe did work. Some vary cant tell me why. This is the code PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat pf = pj.defaultPage();

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-25 Thread java2d
I also installed the driver from Epson website and did not see a way to specify a custom paper size. Where is the driver from? What version? [Message sent by forum member 'jg_at_sun' (jg_at_sun)] http://forums.java.net/jive/thread.jspa?messageID=242227

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-25 Thread java2d
The Epson documentation for windows XP states that you can set a custom paper size following these steps: 1. For Windows XP , click Start Settings Printer and faxes. 2. Click the EPSON LX-300+II ESC/P icon. 3. Select server Properties from the file menu. 4.Select create a new form. 5.Enter the

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-24 Thread java2d
Hi Phil, The problem I have posted regarding the custom paper size is very important for one of our customers who has more than 60 clients with the same printer and the same paper format. I need to know if there is another way around to solve this problem. If this is a bug of the jdk, when it

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-24 Thread Phil Race
[EMAIL PROTECTED] wrote: Hi Phil, The problem I have posted regarding the custom paper size is very important for one of our customers who has more than 60 clients with the same printer and the same paper format. I need to know if there is another way around to solve this problem. Sorry

[JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
I am trying to set a custom paper size using printer jobs but it does not take my custom paper size and instead it takes the default paper size. The code I am using is as follows: PageFormat pageFormat = job.defaultPage(); Paper paper = new Paper(); paper.setSize(500,500); //

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
Sorry again, the word new dropped from PageFormat format = PageFormat(); this should read: PageFormat format = new PageFormat(); Piet [Message sent by forum member 'pietblok' (pietblok)] http://forums.java.net/jive/thread.jspa?messageID=241227

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread Phil Race
Right, on windows, the default paper size is based on the default for the printer which is what makes a lot more sense than a hard-coded value. I believe this was fixed a LONG time ago (1.3 ie 1999-2000) -phil. [EMAIL PROTECTED] wrote: I forgot to mention that, at that time, the default paper

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
I forgot to mention that, at that time, the default paper size was Letter, which was fine for people living in the US, but rather annoying for people living in Europe. That is why I had to create my own A4 class. Have a nice weekend. [Message sent by forum member 'pietblok' (pietblok)]

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
Well, I am not an expert on printing issues, so probably it is as difficult for me as it is for you. The code snippets came from a class that I created some time ago and that seemed to work for me. I remember that it took me some time to get it working at all. The original version of this code

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread Phil Race
If your printer doesn't support custom paper sizes, then setting one will just cause the closest supported paper size to be used. However there is also a bug specific to the case when the end user then changes the printer in the print dialog to one that is not the system default one where we

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
Sorry the code of the Custom class is below: private class Custom extends Paper { public Custom() { super(); setSize(594,491); setImageableArea(36.0, 36.0, 522.99212598425197, 450.8897637795276); } } [Message sent by forum member 'lucho01' (lucho01)]

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
Hi Piet thanks for your help, I am trying to resolve my problem using your code but it did not worked. I am still getting the size A5 no matter what I try to define. I don't know if I am missing something. Please look at the following code and see if you can find what I cant find. PageFormat

Re: [JAVA2D] How to set custom paper size using printer jobs

2007-10-19 Thread java2d
Hi, I am not sure what you are doing wrong. However, a long time ago I experimented with printing and maybe some code snippets will help you. private class A4 extends Paper { public A4() { super(); setSize(594.992125984252, 841.8897637795276);