Index: third_party/WebKit/Source/core/inspector/browser_protocol.json |
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
index ccc2d2b3bd2516d1cf26cac51ef0bef53e2daa0f..fabb457571bf9e5659ba768616e0de49699ace67 100644 |
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json |
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
@@ -430,6 +430,19 @@ |
{ |
"name": "printToPDF", |
"description": "Print page as pdf.", |
Lei Zhang
2017/05/04 07:29:38
BTW, write "PDF" because it expands out to Portabl
jzfeng
2017/05/05 02:41:34
Done.
|
+ "parameters": [ |
+ {"name": "landscape", "type": "boolean", "optional": true, "description": "Paper orientation. Defaults to false."}, |
+ {"name": "displayHeaderFooter", "type": "boolean", "optional": true, "description": "Display header and footer. Defaults to false."}, |
+ {"name": "printBackgrounds", "type": "boolean", "optional": true, "description": "Print background colors. Defaults to false."}, |
Lei Zhang
2017/05/04 07:29:38
Write "background graphics" to be more correct, an
jzfeng
2017/05/05 02:41:34
Done.
|
+ {"name": "scale", "type": "number", "optional": true, "description": "Scale of the pdf. Defaults to 1."}, |
Lei Zhang
2017/05/04 07:29:38
The description is a bit confusing. Does this mean
jzfeng
2017/05/05 02:41:34
Done.
|
+ {"name": "paperWidth", "type": "number", "optional": true, "description": "Paper width in inch. Defaults to 8.5 inch."}, |
Lei Zhang
2017/05/04 07:29:38
inches, ditto everywhere below.
jzfeng
2017/05/05 02:41:34
Done.
Lei Zhang
2017/05/05 03:53:00
Still need to write inches in a bunch of places.
jzfeng
2017/05/05 04:28:10
Do you mean I should also use inches in "in inch"?
Lei Zhang
2017/05/05 04:40:17
Yes, as in Q: "What is the unit of measure?" A: "W
|
+ {"name": "paperHeight", "type": "number", "optional": true, "description": "Paper height. Defaults to 11 inch."}, |
+ {"name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inch. Defaults to 1cm = ~2/5 of an inch."}, |
Lei Zhang
2017/05/04 07:29:38
Just write "Defaults to 1 cm. (~0.4 inches)"
jzfeng
2017/05/05 02:41:34
Done.
|
+ {"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inch. Defaults to 1cm = ~2/5 of an inch."}, |
+ {"name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inch. Defaults to 1cm = ~2/5 of an inch."}, |
+ {"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inch. Defaults to 1cm = ~2/5 of an inch."}, |
+ {"name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to print all pages."} |
Lei Zhang
2017/05/04 07:29:38
Defaults to the empty string, which means print al
jzfeng
2017/05/05 02:41:34
Done.
|
+ ], |
"returns": [ |
{ "name": "data", "type": "string", "description": "Base64-encoded pdf data." } |
], |