edabg / jsprintsetup

JSPrintSetup Firefox addon
Mozilla Public License 2.0
76 stars 39 forks source link

setOption('scaling', 50) does not work #56

Open BluewaterBeach opened 6 years ago

BluewaterBeach commented 6 years ago

I'm using the following code:

jsPrintSetup.setOption('orientation', jsPrintSetup.kPortraitOrientation); jsPrintSetup.setPaperSizeData(5); jsPrintSetup.setOption('scaling', 50); jsPrintSetup.setOption('marginTop', 5); jsPrintSetup.setOption('marginBottom', 5); jsPrintSetup.setOption('marginLeft', 5); jsPrintSetup.setOption('marginRight', 5); jsPrintSetup.setOption('headerStrLeft', 'Sent by Builder Lynx'); jsPrintSetup.setOption('headerStrCenter', ''); jsPrintSetup.setOption('headerStrRight', '&PT'); jsPrintSetup.setOption('footerStrLeft', ''); jsPrintSetup.setOption('footerStrCenter', ''); jsPrintSetup.setOption('footerStrRight', ''); jsPrintSetup.clearSilentPrint(); jsPrintSetup.setOption('printSilent', 1); jsPrintSetup.setOption('outputFormat', 2); jsPrintSetup.setOption('toFileName', '/home/cc/cc/cc/msg/saveAs/2230000/2238000/Msg2238059.html.pdf'); jsPrintSetup.print();

It works fine, but I need to scale down the print output to a small size to fit everything on the page. To do this, I use the call: jsPrintSetup.setOption('scaling', 50);

However, the printout does not generate the file at any different size. My understanding is that the 'scaling' option works in the same way as the Scale setting in the Print Preview UI in Firefox.

Is there some other way that this should be done? Or can this be fixed? It would be great if I can get this resolved.

Any help would be appreciated.

Thanks!