Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsPrintSetup.setOption( 'toFileName', 'xy.pdf' ) not working in W10 #48

Open
rudiultra opened this issue Aug 14, 2017 · 5 comments
Open

Comments

@rudiultra
Copy link

I am using the 'toFileName' option and silent printing.

Environtment 1)
Linux: Ubuntu 16.04
Firrefox: 54.0 64bit
Works fine.

Environtment 2)
Windows: W10
Firrefox: 47.0.2 32-bit and 54.0.1 32 bit
Problem: A dialog for the file name pops up.

@mitkola
Copy link
Contributor

mitkola commented Aug 14, 2017

Can you post sample code to reproduce?

@rudiultra
Copy link
Author

HI Dimitar!

Here my sample:

jsPrintSetup.setOption( 'printToFile', 1 )
jsPrintSetup.setOption( 'outputFormat', 'kOutputFormatPDF' )
jsPrintSetup.setOption( 'toFileName', 'c:\\Downloads\\xy.pdf' )    // or '/home/xy/Download/xy.pdf'
jsPrintSetup.setSilentPrint(true)
jsPrintSetup.print()
jsPrintSetup.setSilentPrint(false)   

Servus from Vienna

@rudiultra
Copy link
Author

Sorry for this line:
jsPrintSetup.setOption( 'printToFile', 1 )
jsPrintSetup.setOption( 'outputFormat', jsPrintSetup.kOutputFormatPDF ) // correct statement
jsPrintSetup.setOption( 'toFileName', 'c:\Downloads\xy.pdf' ) // or '/home/xy/Download/xy.pdf'
jsPrintSetup.setSilentPrint(true)
jsPrintSetup.print()
jsPrintSetup.setSilentPrint(false)

@rudiultra
Copy link
Author

rudiultra commented Aug 14, 2017 via email

@mitkola
Copy link
Contributor

mitkola commented Aug 15, 2017

I have tested this code on Windows 10, FF 54.0.1 32-bit and works fine.
Try on fresh firefox install without other addons.

function test() {
//	jsPrintSetup.setGlobalOption('DEBUG', true);
	jsPrintSetup.setOption( 'printToFile', 1 );
	jsPrintSetup.setOption( 'outputFormat', jsPrintSetup.kOutputFormatPDF );
	jsPrintSetup.setOption( 'toFileName', 'd:\\Temp\\xy.pdf' );
	jsPrintSetup.setSilentPrint(true)
	jsPrintSetup.print()
	jsPrintSetup.setSilentPrint(false)
} 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants