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

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

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: 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
« no previous file with comments | « headless/lib/renderer/headless_print_web_view_helper_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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."},
+ {"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."},
+ {"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'."},
+ {"name": "marginType", "type": "string", "optional": true, "enum": ["defaultMargin", "noMargin", "customMargin"], "description": "Margin type. Set to 'customMargin' to customize margin."},
+ {"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." }
],
« no previous file with comments | « headless/lib/renderer/headless_print_web_view_helper_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698