-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c.Page.PrintToPDF is stuck #151
Comments
Are you using the example as-is? https://github.com/mafredri/cdp/blob/e5a75ebc0b46b7dbf5553fc2ff6f2b11754d65ea/example_test.go If yes, can you try to add logging and show the output? Example here: Lines 49 to 52 in e5a75eb
And finally, what browser/version are you using? |
Yes, I am using that example, and I printed the log but it only returned this,
it seems that the response was not received, But when I manually navigate the browser to another address while the browser is stuck there, it prints out the error log.
and i am using version 129.0.6667.0 of chromium |
Hi, when i use this code, screenshot can work well but the pdf cannot. It is stuck this code: "pdfData, err := c.Page.PrintToPDF(ctx, pdfArgs)."
` screenshotName := "screenshot.jpg"
screenshotArgs := page.NewCaptureScreenshotArgs().
SetFormat("jpeg").
SetQuality(80)
screenshot, err := c.Page.CaptureScreenshot(ctx, screenshotArgs)
if err != nil {
return err
}
if err = ioutil.WriteFile(screenshotName, screenshot.Data, 0o644); err != nil {
return err
}
The text was updated successfully, but these errors were encountered: