You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to convert HTML to a PDF file, but I'm encountering issues due to excessively large image data, causing the process to slow down. I have tried using the Page.printToPDF method with the transferMode set to ReturnAsStream parameters.
However, the value of the result['stream'] is consistently '1', and I am unsure about why this is happening and how to resolve it. Any assistance would be greatly appreciated.
My Chrome version is: 121.0.6167.85 (x86_64)
My system OS version is: macOS 13.5.2
I am using Python with Selenium, and the code is as follows:
For anyone else who runs into this question in the future, I had the same issue and figured out that the result['stream'] value must be used with the CDP IO.read() function, passing the handle=result['stream'] as the handle parameter (and making sure to take care of the base64 encoding stuff, and watching for the eof flag. It's pretty easy to do, and does save a lot of memory overhead.
I am attempting to convert HTML to a PDF file, but I'm encountering issues due to excessively large image data, causing the process to slow down. I have tried using the Page.printToPDF method with the transferMode set to ReturnAsStream parameters.
However, the value of the result['stream'] is consistently '1', and I am unsure about why this is happening and how to resolve it. Any assistance would be greatly appreciated.
My Chrome version is: 121.0.6167.85 (x86_64)
My system OS version is: macOS 13.5.2
I am using Python with Selenium, and the code is as follows:
The text was updated successfully, but these errors were encountered: