Cheng Zhao
d483352f78
Fix PrintToPDF not receiving results
2017-02-06 10:34:29 -08:00
Cheng Zhao
ab783413a2
Update printing code to latest
2017-02-06 10:34:29 -08:00
Vadim Macagon
7c5d3296e7
Prevent undefined behavior when some Node Buffer objects are destroyed
...
If node::Buffer::New() is used to wrap an existing chunk of memory
without providing a custom callback to release that memory then Node
will just use `free()`. In a couple of places Node buffer objects were
constructed from chunks of memory that were allocated with `new[]`, but
a custom callback to release that memory was omitted, this resulted in
undefined behavior when those buffers were destroyed because `free()`
was used to release memory allocated with `new[]`.
To avoid undefined behavior the aforementioned buffer objects are now
constructed with a custom callback that safely releases the underlying
chunk of memory.
2016-10-03 10:26:26 +07:00
Cheng Zhao
a2bd55dd3c
Adapt to changes of Chrome 51 API changes (Part 2)
2016-05-23 12:29:14 +09:00
Cheng Zhao
5fae63a2f5
Fix compilation errors on OS X
2016-03-10 17:06:21 +09:00
Haojian Wu
11ffb9dfb6
Fix node::Buffer API changes.
2015-08-11 09:48:29 +08:00
Haojian Wu
16348fc895
Copy pdf data on IO thread to avoid causing main process hangs.
2015-06-16 20:08:30 +08:00
Haojian Wu
57580e00f9
Fix code style.
2015-06-16 20:07:45 +08:00
Haojian Wu
93bbc6c810
Simplify the pdf-data handled code.
2015-06-16 20:07:45 +08:00
Haojian Wu
894f9c0cb0
Don't use duprecated node buffer api, fix build error on OS X.
2015-06-16 20:07:44 +08:00
Haojian Wu
ccbe554ec0
Make callback aligns node.js style.
2015-06-16 20:07:44 +08:00
Haojian Wu
93243ef223
Remove some unused IPC messages.
2015-06-16 20:07:44 +08:00
Haojian Wu
ac62871645
Return node::Buffer as a printToPDF callback result.
2015-06-16 20:07:44 +08:00
Haojian Wu
ab40da3f31
Add silent and savePath options.
2015-06-16 20:07:43 +08:00
Haojian Wu
6e099af5fe
Move PDF printing setting in JS part.
2015-06-16 20:07:43 +08:00
Haojian Wu
2597ded985
Cleanup.
2015-06-16 20:02:25 +08:00
Haojian Wu
600077996c
Fix a landscape option error.
2015-06-16 20:02:24 +08:00
Haojian Wu
cef177abc4
Add preview failed error.
2015-06-16 20:02:24 +08:00
Haojian Wu
8572ccb807
Add callback function in printToPDF API.
2015-06-16 20:02:24 +08:00
Haojian Wu
ce8bbb689c
Add options to custom print settings in printToPDF API.
2015-06-16 20:02:24 +08:00
Haojian Wu
9cf9229308
Write PDF file in FILE thread.
2015-06-16 20:02:23 +08:00
Haojian Wu
7ffa7042b1
Add printToPDF Implementation.
2015-06-16 20:02:23 +08:00