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

Issue 748956 link

Starred by 9 users

Issue metadata

Status: Assigned
Owner:
Last visit 29 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

printPDF to return a stream

Reported by balakire...@gmail.com, Jul 26 2017

Issue description

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

Steps to reproduce the problem:
1.Using [PrintToPDF](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) print a page

What is the expected behavior?
Result of the function is a stream

What went wrong?
Result of the function is a base64 encoded string, which can be huge. It may cause performance and memory issues.

Did this work before? No 

Chrome version: 61.0.3135.4  Channel: dev
OS Version: Ubuntu 16.04.2 LTS
Flash Version: 

Currently `printToPDF` returns a `base64` encoded string. It works great in general, but we are generating a bit huge PDFs - min 40MBs, they include lot of pages with high resolution images. Keeping such big data in memory causes performance and memories issues with node. It would be nice to take PDF content as a stream, or as a file. 

Currently we are thinking about workaround with page per page printing. But it dramatically increases complexity of the service. So my question is: are there any plans to support streams for `printToPDF`?

ref https://github.com/ChromeDevTools/devtools-protocol/issues/41
 

Comment 1 by caseq@chromium.org, Jul 26 2017

Cc: caseq@chromium.org dgozman@chromium.org
Components: Internals>Headless
Labels: -OS-Linux OS-All
Owner: jzfeng@chromium.org
Status: Assigned (was: Unconfirmed)
Owner: lushnikov@chromium.org

Sign in to add a comment