Replies: 1 comment 7 replies
-
Firstly the API doc is version specific http://cefsharp.github.io/api/
There are no width/height properties, there are PageWidth/PageHeight which are intended to specify the page size, A4, A5, letter etc.
Testing with version 101.0.180 using WinForms, default settings and I'm not seeing any jump. How does the default page size behave? Rendering and PDF generation are all implemented at the Chromium level, make sure you are using the latest version. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the "PrintToPdfAsync" method https://cefsharp.github.io/api/63.0.0/html/M_CefSharp_WebBrowserExtensions_PrintToPdfAsync.htm to export HTML view to pdf. However I am experiencing following issues:
With this API (PrintToPdfAsync), I am unable to pass complete "viewport" that I want to be exported. I can pass width and height (possibly page dimension in micron). Question: How cefSharp determines the "view port"? Which element window or body?
The major issue I am experiencing is that just after the call to the method, "view is scrolled up", thereby the exported pdf does not contain the expected view port area. Here is a screen capture:
So the exported pdf is contains area (top part) that was not part of the intended export.

Beta Was this translation helpful? Give feedback.
All reactions