Open ederuiter opened 8 years ago
Hi,
In early versions of nsIPrintSettings interface there was no possibility to control duplex printing. Today I did search in interface and found that there is new (for me) attribute 'duplex'. http://mxr.mozilla.org/mozilla-central/source/widget/nsIPrintSettings.idl#246
The attribute exists, but there is no information about valid values (something like Flip on long edge, Flip on shot edge). I was searched in all source code, but can't find how is used at all. I think that at the moment is not implemented. I was also make some tests to do manual printing on duplex printer and change duplex behavior and monitor how was changed preference 'print_duplex' in about:config. This setting have same value '-437918235' independently of what I've set.
If you can find information how attribute 'duplex' (if it is implemented), I can implement it.
Regards,
Dimitar Angelov
It seems to be set in http://mxr.mozilla.org/mozilla-central/source/widget/gtk/nsPrintSettingsGTK.cpp#794 .. but I guess this is only for gtk (Linux) so probably the value is os dependant
I'm currently on holiday, so I don't have access to my laptop, so I can't look any further into this right now (using mxr on a mobile device is not fun). Thanks for the pointer, If you don't have time to look into this I will dive into it after my holiday.
----- Original Message ----- From: Dimitar Angelov notifications@github.com To: edabg/jsprintsetup jsprintsetup@noreply.github.com Cc: ederuiter eric.deruiter@amplixs.com Sent: Thu, 24 Mar 2016 10:52:58 +0100 (CET) Subject: Re: [jsprintsetup] Unable to set duplex (two-sided) option (#8)
Hi,
In early versions of nsIPrintSettings interface there was no possibility to control duplex printing. Today I did search in interface and found that there is new (for me) attribute 'duplex'. http://mxr.mozilla.org/mozilla-central/source/widget/nsIPrintSettings.idl#246
The attribute exists, but there is no information about valid values (something like Flip on long edge, Flip on shot edge). I was searched in all source code, but can't find how is used at all. I think that at the moment is not implemented. I was also make some tests to do manual printing on duplex printer and change duplex behavior and monitor how was changed preference 'print_duplex' in about:config. This setting have same value '-437918235' independently of what I've set.
If you can find information how attribute 'duplex' (if it is implemented), I can implement it.
Regards,
Dimitar Angelov
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/edabg/jsprintsetup/issues/8#issuecomment-200762664
First of all thanks for the great plugin! I want to set the duplex (two-sided) option from javascript, currently this is not possible with jsprintsetup. In addition to that it would also be nice to be able to set the collate option. Would it be possible to add this functionality? (If you could point me to the right direction I can write the code myself and send you a pull request)