Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: third_party/WebKit/Source/core/inspector/browser_protocol.json

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: nit change Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 cca3bc914abf20def2b85f6c03a4bedc80a611dd..59e300656a8f5a002dc0a4333f0c20f837fc8672 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -430,6 +430,20 @@
{
"name": "printToPDF",
"description": "Print page as pdf.",
+ "parameters": [
+ {"name": "dpi", "type": "integer", "optional": true, "description": "DPI of the printed file."},
Eric Seckler 2017/04/20 09:15:28 what's the default value? also, this doesn't seem
jzfeng 2017/04/27 06:56:07 Removed this parameter, because it is not well sup
+ {"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 graphics. Defaults to false."},
Eric Seckler 2017/04/20 09:15:28 nit: colors/graphics
jzfeng 2017/04/27 06:56:07 Done.
+ {"name": "scale", "type": "number", "optional": true, "description": "Scale of the pdf. Defaults to 1."},
+ {"name": "paperType", "type": "string", "optional": true, "enum": ["letter", "legal", "A4", "A3"], "description": "Paper type. Defaults to 'letter'."},
Eric Seckler 2017/04/20 09:15:28 Are these all the paper sizes we can support? Mayb
Lei Zhang 2017/04/20 19:08:59 That's a product decision. If you go with only mm
martinsb 2017/04/26 08:10:00 Thank you very much for your efforts, I have no do
jzfeng 2017/04/27 06:56:07 Add a new "CUSTOM" page type to let the user speci
Eric Seckler 2017/04/27 08:57:00 For my taste, this is more complicated than it nee
jzfeng 2017/05/02 07:50:55 Sounds good. Done.
+ {"name": "marginType", "type": "string", "optional": true, "enum": ["defaultMargin", "noMargin", "customMargin"], "description": "Margin type. Set to 'customMargin' to customize margin."},
Eric Seckler 2017/04/20 09:15:28 I'm not sure we need this field. I'd propose we ge
jzfeng 2017/04/27 06:56:07 Sounds good. Done.
+ {"name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inch. Set when margin type is 'custom'."},
+ {"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inch. Set when margin type is 'custom'."},
+ {"name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inch. Set when margin type is 'custom'."},
+ {"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inch. Set when margin type is 'custom'."},
+ {"name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to print all pages."}
+ ],
"returns": [
{ "name": "data", "type": "string", "description": "Base64-encoded pdf data." }
],

Powered by Google App Engine
This is Rietveld 408576698