We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
11.2.3
Ubuntu
18.04
x64
No response
expected to print to hardware printers, as well as virtual printers, with margins and any other options as specified.
does not print to hardware printer. instead device perpetually indicates that it is processing data.
prints to virtual pdf printer, ignoring specified options such as margintype and margins when margintype is custom.
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <div style="position: absolute; top: 0in; left: 0in;">0</div> <div style="position: absolute; top: 0in; left: 1in;">1</div> <div style="position: absolute; top: 0in; left: 2in;">2</div> <div style="position: absolute; top: 0in; left: 3in;">3</div> <div style="position: absolute; top: 0in; left: 4in;">4</div> <div style="position: absolute; top: 0in; left: 5in;">5</div> <div style="position: absolute; top: 0in; left: 6in;">6</div> <div style="position: absolute; top: 0in; left: 6.5in;">6.5</div> <div style="position: absolute; top: 0in; left: 0in;">0</div> <div style="position: absolute; top: 1in; left: 0in;">1</div> <div style="position: absolute; top: 2in; left: 0in;">2</div> <div style="position: absolute; top: 3in; left: 0in;">3</div> <div style="position: absolute; top: 4in; left: 0in;">4</div> <div style="position: absolute; top: 5in; left: 0in;">5</div> <div style="position: absolute; top: 6in; left: 0in;">6</div> <div style="position: absolute; top: 7in; left: 0in;">7</div> <div style="position: absolute; top: 8in; left: 0in;">8</div> <div style="position: absolute; top: 9in; left: 0in;">9</div> </body> <script> document.addEventListener("DOMContentLoaded", function () { let win = BrowserWindow.getFocusedWindow(); var options = { color: false, dpi: { horizontal: 300, vertical: 300 }, margins: { marginType: "custom", top: 300, bottom: 300, left: 300, right: 300 }, pageSize: "Letter" }; win.webContents.print(options, (success, failureReason) => { if (!success) console.log(failureReason); console.log('Print Initiated'); }); }); </script> </html>
The text was updated successfully, but these errors were encountered:
I met the same issue on 13.1.7 on Ubuntu
Message is "libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)"
may relates intel/libva#278
execute "window.print()" directly in rendered works, though.
Sorry, something went wrong.
i eventually used printToPDF(), PDFJS and then the pdf-to-printer module to both workaround it and provide a preview.
Closing as this should be working in latest supported versions.
No branches or pull requests
Preflight Checklist
Electron Version
11.2.3
What operating system are you using?
Ubuntu
Operating System Version
18.04
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
expected to print to hardware printers, as well as virtual printers, with margins and any other options as specified.
Actual Behavior
does not print to hardware printer. instead device perpetually indicates that it is processing data.
prints to virtual pdf printer, ignoring specified options such as margintype and margins when margintype is custom.
Testcase Gist URL
No response
Additional Information
The text was updated successfully, but these errors were encountered: