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

Print enhancement #8596

Merged
merged 13 commits into from May 18, 2017

Conversation

Projects
None yet
8 participants
@renaesop
Copy link
Contributor

renaesop commented Feb 6, 2017

Add webContents.printerList And a print option to select printer

When electron/native-mate#9 get merged, it will pass the ci build and test

renaesop added some commits Feb 7, 2017

Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	atom/browser/api/atom_api_web_contents.cc
#	chromium_src/chrome/browser/printing/print_job_worker.cc
#	chromium_src/chrome/browser/printing/print_job_worker.h
#	chromium_src/chrome/browser/printing/print_view_manager_base.cc
#	chromium_src/chrome/browser/printing/print_view_manager_base.h
#	chromium_src/chrome/browser/printing/printer_query.cc
#	chromium_src/chrome/common/print_messages.cc
#	chromium_src/chrome/renderer/printing/print_web_view_helper.cc
Print enhancement: add webContents.printerList And a print option to …
…select printer

Print enhancement: add webContents.printerList And a print option to select printer

@renaesop renaesop force-pushed the renaesop:master branch from 1aefc25 to 7f2705b Feb 7, 2017

@renaesop renaesop closed this Feb 14, 2017

@renaesop renaesop reopened this Feb 14, 2017

@renaesop renaesop force-pushed the renaesop:master branch from 233e75e to 7f2705b Feb 14, 2017

@pushpak pushpak referenced this pull request Feb 15, 2017

Closed

print enhancement #8442

@@ -1634,6 +1662,7 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
&WebContents::UnregisterServiceWorker)
.SetMethod("inspectServiceWorker", &WebContents::InspectServiceWorker)
.SetMethod("print", &WebContents::Print)
.SetMethod("printerList", &WebContents::GetPrinterList)

This comment has been minimized.

@kevinsawicki

kevinsawicki Feb 15, 2017

Contributor

Could you add a new test for this method? Even if it just asserts that an array is returned, it will at least verify that no crashes occur on each platform and will give some coverage of this API.

This comment has been minimized.

@renaesop

renaesop Feb 16, 2017

Contributor

ok


std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList(
mate::Arguments* args) {
std::vector<printing::PrinterBasicInfo> printerList;

This comment has been minimized.

@kevinsawicki

kevinsawicki Feb 15, 2017

Contributor

Usually underscores are used instead of camel case for variable names. So perhaps this should be printer_list or just printers. Same thing for printBackend below.

@alexandreprado

This comment has been minimized.

Copy link

alexandreprado commented Mar 2, 2017

Hi guys, any update on this?

@renaesop

This comment has been minimized.

Copy link
Contributor

renaesop commented Mar 3, 2017

I'm sorry。But I found printing with device not working with new Chrome 55(48 is ok). And I don‘t know why and how?

@mrenty

This comment has been minimized.

Copy link

mrenty commented Mar 22, 2017

Hi @renaesop any updates?

@jrobeson

This comment has been minimized.

Copy link

jrobeson commented Apr 6, 2017

@renaesop : with the recent printer fixes, I hope this works now :)

@kevinsawicki

This comment has been minimized.

Copy link
Contributor

kevinsawicki commented Apr 12, 2017

But I found printing with device not working with new Chrome 55(48 is ok)

@renaesop there have been some recent printing fixes in the last couple weeks, is this pull request still something you are working on?

@renaesop

This comment has been minimized.

Copy link
Contributor

renaesop commented Apr 13, 2017

Thanks. I'll commit some code later.

@Batajus

This comment has been minimized.

Copy link

Batajus commented May 8, 2017

Hey guys,
are there any updates?
I could use this feature.

@renaesop

This comment has been minimized.

Copy link
Contributor

renaesop commented May 9, 2017

It seems work

@Phhansen

This comment has been minimized.

Copy link

Phhansen commented May 9, 2017

I tried out the PR from @renaesop last week as we, here at the office, are interested in the print features. It does work wonderfully with the two printers we tested with on both windows10 and macOS.

@fanchou

This comment has been minimized.

Copy link

fanchou commented May 16, 2017

merge this? @kevinsawicki

@kevinsawicki kevinsawicki self-assigned this May 17, 2017

kevinsawicki added some commits May 18, 2017

@mrenty

This comment has been minimized.

Copy link

mrenty commented May 18, 2017

@kevinsawicki is on 🔥 🎉

@kevinsawicki kevinsawicki merged commit e0b9395 into electron:master May 18, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@kevinsawicki

This comment has been minimized.

Copy link
Contributor

kevinsawicki commented May 18, 2017

Thanks so much for this @renaesop, this is great to have support for in Electron 🖨 👍

I've pushed a few minor changes, this will included in the next Electron release, 1.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment