Add options to custom print settings in printToPDF API.
This commit is contained in:
parent
9cf9229308
commit
ce8bbb689c
6 changed files with 40 additions and 11 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "native_mate/callback.h"
|
||||
#include "native_mate/constructor.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
|
||||
#include "atom/common/node_includes.h"
|
||||
|
@ -430,8 +431,13 @@ void Window::Print(mate::Arguments* args) {
|
|||
window_->Print(settings.silent, settings.print_background);
|
||||
}
|
||||
|
||||
void Window::PrintToPDF() {
|
||||
window_->PrintToPDF();
|
||||
void Window::PrintToPDF(mate::Arguments* args) {
|
||||
mate::Dictionary options;
|
||||
if (args->Length() == 1 && !args->GetNext(&options)) {
|
||||
args->ThrowError();
|
||||
return;
|
||||
}
|
||||
window_->PrintToPDF(options);
|
||||
}
|
||||
|
||||
void Window::SetProgressBar(double progress) {
|
||||
|
|
|
@ -132,7 +132,7 @@ class Window : public mate::EventEmitter,
|
|||
bool IsDocumentEdited();
|
||||
void CapturePage(mate::Arguments* args);
|
||||
void Print(mate::Arguments* args);
|
||||
void PrintToPDF();
|
||||
void PrintToPDF(mate::Arguments* args);
|
||||
void SetProgressBar(double progress);
|
||||
void SetOverlayIcon(const gfx::Image& overlay,
|
||||
const std::string& description);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue