New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 757728 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

printToPDF does not accept scale parameter larger than 2

Reported by martins....@gmail.com, Aug 22 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce the problem:
1. Start headless chrome, e.g., /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --remote-debugging-port=9222 --disable-gpu
2. Connect to the headless chrome via chrome-remote-interface in REPL mode, e.g., chrome-remote-interface -p 9222 inspect
3. Open any page, e.g., Page.navigate({url: 'http://chromestatus.com'})
4. Try acquiring data of a PDF document: `Page.printToPDF({scale: 2.1})`

What is the expected behavior?
I expect base64-encoded data to be printed out in the console. I expect the same with even larger scale parameter values.

What went wrong?
I get the error which reads:
>>> Page.printToPDF({scale: 2.1})
{ error:
   { code: -32602,
     message: 'Missing or invalid \'scale\' parameter' } }

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.101  Channel: dev
OS Version: OS X 10.12.6
Flash Version: 

It appears that the largest scale number that printToPDF accepts is 2.
 

Comment 1 by lgrey@chromium.org, Aug 22 2017

Components: Internals>Headless
Cc: dvallet@chromium.org
Labels: Needs-Triage-M60
martins.barinskis@ Thanks for the issue.

Tried to repro the issue on Mac 10.12.6 using Stable 60.0.3112.101 with the below steps.
1.launched Chrome from the terminal using the above instructions (/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --remote-debugging-port=9222 --disable-gpu)
2. Unable to open the browser.

Requesting 'Internals>Headless' team to look into the issue and CC'ing dvallet@chromium.org for further help in triaging the issue.

Thanks..
Cc: jzfeng@chromium.org rbpotter@chromium.org
Components: Internals>Printing
Status: WontFix (was: Unconfirmed)
This is working as intended. Scaling in headless has the same range as scaling in print preview, which is 200%, AKA 2.

Sign in to add a comment