sureshbvs
asked on
How to set Custom MediaSizeName?
Hi Experts,
I liked to know how to set a custome MediaSizeName, for taking the print of a bill. Now I am using MediaSizeName.ISO_A4, instead of that the paper I am going to use is of size 100mm x 150mm size.
Now I am using :
DocFlavor flavor = DocFlavor.SERVICE_FORMATTE D.PRINTABL E;
PrintRequestAttributeSet pras = new HashPrintRequestAttributeS et();
pras.add(OrientationReques ted.PORTRA IT);
pras.add(MediaSizeName.ISO _A4);
pras.add(new Copies(1));
pras.add(new JobName("My job", null));
PrintService printServices[] = PrintServiceLookup.lookupP rintServic es(flavor, pras);
Regards
Suresh
I liked to know how to set a custome MediaSizeName, for taking the print of a bill. Now I am using MediaSizeName.ISO_A4, instead of that the paper I am going to use is of size 100mm x 150mm size.
Now I am using :
DocFlavor flavor = DocFlavor.SERVICE_FORMATTE
PrintRequestAttributeSet pras = new HashPrintRequestAttributeS
pras.add(OrientationReques
pras.add(MediaSizeName.ISO
pras.add(new Copies(1));
pras.add(new JobName("My job", null));
PrintService printServices[] = PrintServiceLookup.lookupP
Regards
Suresh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Pls. Accept the Answer posted by tapasvi. ;-)
taps
taps
taps