[Jsprintsetup] How to setup papersize as 150mmX150mm

Dimitar Angelov mitko at edabg.com
Fri Jun 10 00:57:18 PDT 2011


Hi,

It is not some standard paper size or at least from built in paper size 
definitions in jsPrintSetup.
You can read more about paper handling at:
http://jsprintsetup.mozdev.org/reference.html#ENHANCED_PAPERHANDLING

You can define you paper size using definePaperSize method and use it.
Under Linux,  Firefox use paperName attribute of printer settings to 
identify paper, under Windows is using paperData attribute.
I suggest to do the following:
You can Manually in FF set page setup select paper (it must be already 
available 150x150, if is not available you must define custom paper 
size) and print to desired printer test page.
1. Go to about:config and get values of 
print.printer_YOUR_PRINTER_NAME.print_paper_name
print.printer_YOUR_PRINTER_NAME.print_paper_size_unit
(0 = jsPrintSetup.kPaperSizeInches, 1 = jsPrintSetup.kPaperSizeMillimeters)
print.printer_YOUR_PRINTER_NAME.print_paper_height
print.printer_YOUR_PRINTER_NAME.print_paper_width

2. Use jsPrintSetup.definePaperSize to define your paper as follow
jsPrintSetup.definePaperSize(100, 100, paper_name, paper_name, 'my paper 
name', paper_width, paper_height, paper_size_unit);

3. If you want to use paper for print call
jsPrintSetup.setPaperSizeData(100);


I hope this help you!

Regards,

Dimitar Angelov


On 10.6.2011 г. 10:10, Dinesh Kumar wrote:
>
> Hi! I am working in a web based billing software, Whenever i give print
> it produces output in A4 format. After googling i found that, a useful
> plugin jsprintsetup exits. Thanks for the developer who develop this.
> But i am unable to setup the paper size. How to setup paper size as
>   150mmX150mm? Please help me.
> --
> Regards.
> M.Dineshkumar



More information about the Jsprintsetup mailing list