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

window print default settings / custom preview #4836

Closed
AndryBray opened this issue May 10, 2016 · 2 comments
Closed

window print default settings / custom preview #4836

AndryBray opened this issue May 10, 2016 · 2 comments

Comments

@AndryBray
Copy link

AndryBray commented May 10, 2016

Hi @rogerwang
Is there any way to load a kind of config on the window.print() method?

The most important would be the possibility to auto select:

Save as PDF (in the printer/destination option)
Options (print header/footer, layout, margins,...)

The best solution would be the possibility to customize / override the print preview GUI & Api methods (https://github.com/nwjs/chromium.src/tree/nw13/chrome/browser/resources/pdf and
https://github.com/nwjs/chromium.src/tree/nw13/chrome/browser/resources/print_preview),
for example switch the "Print" button in "Save PDF", hidding the printers select/input, and so on...

The main reason of this feature would be to save html pages as file using the chrome rendering process.

@AndryBray
Copy link
Author

AndryBray commented May 10, 2016

Another good alternative would be some method to pass html string/url and call the pdf preview process returning a datauri pdf content... I hope it could be done in some way. Thank you

@rogerwang
Copy link
Member

Thanks for the suggestion. There was some discussion in #1263 (comment) for nw13 on this. I'm merging this issue with it. Please post your idea there and we'll continue the discussion.

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