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
first of all my compliments for the tool, which could be very useful to all grafana users.
While trying to export to PDF long tables (by long I mean with scroll on the right side, as in picture below), I realized the tool is exporting just a part of it (top part).
This is the table report (in view panel) I want to export:
This is what I get in the export:
What I am expecting is to export all the rows of the table, no matter is they are visualized at the current moment in the panel (otherwise I could use "print to PDF" in web browser directly, without cloning container, installing docker, run container, config it, etc.
It seems to me the tool is not getting the right height. I am attaching the docker log for better reference (look at line "Page height adjusted to: 800"):
2024-09-04 13:45:10 Server is listening on port 3001
2024-09-04 13:48:17 Script grafana_pdf.js started...
2024-09-04 13:48:17 PDF width set to: 2000
2024-09-04 13:48:17 URL provided: http://192.168.11.84:3000/d/d36ff238-208d-4383-b56c-e5dbf1c4d255/doffing-performance?orgId=1&from=1724845696708&to=1725450496708&viewPanel=5&theme=light
2024-09-04 13:48:17 Checking URL accessibility...
2024-09-04 13:48:17 (node:14) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2024-09-04 13:48:17 (Use `node --trace-deprecation ...` to show where the warning was created)
2024-09-04 13:48:17 Checking if kiosk mode is enabled.
2024-09-04 13:48:17 Kiosk mode not enabled. Enabling it.
2024-09-04 13:48:17 Kiosk mode enabled.
2024-09-04 13:48:17 Starting browser...
2024-09-04 13:48:18 Browser started...
2024-09-04 13:48:18 Navigating to URL...
2024-09-04 13:48:22 Page loaded...
2024-09-04 13:48:22 Extracting dashboard name and date from the HTML page...
2024-09-04 13:48:22 Dashboard name not found. Using default value.
2024-09-04 13:48:22 Date not found. Using default value.
2024-09-04 13:48:22 Debug HTML file saved at: ./debug/debug_output_grafana_2024-09-04_uy4xef.html
2024-09-04 13:48:22 Page height adjusted to: 800
2024-09-04 13:48:22 Generating PDF...
2024-09-04 13:48:22 PDF generated: ./output/output_grafana_2024-09-04_dtxnx.pdf
2024-09-04 13:48:22 Browser closed.
I cloned just yesterday the ExportGrafanaDashboardToPDF, so it is the latest release.
I am using grafana Grafana v11.2.0 (c57667e448) but I was able to test it (with same result) on grafana Grafana v10.1.1 (0cfa76b22d)
I guess the problem is something around these lines of the grafana_pdf.js file
await page.evaluate(async () => {
const scrollableSection = document.querySelector('.scrollbar-view');
if (scrollableSection) {
const childElement = scrollableSection.firstElementChild;
let scrollPosition = 0;
let viewportHeight = window.innerHeight;
while (scrollPosition < childElement.scrollHeight) {
scrollableSection.scrollBy(0, viewportHeight);
await new Promise(resolve => setTimeout(resolve, 500));
scrollPosition += viewportHeight;
}
}
});
but I was not able to fix it.
Thanks in advance for the support.
Filippo
The text was updated successfully, but these errors were encountered:
Hello,
first of all my compliments for the tool, which could be very useful to all grafana users.
While trying to export to PDF long tables (by long I mean with scroll on the right side, as in picture below), I realized the tool is exporting just a part of it (top part).
This is the table report (in view panel) I want to export:
This is what I get in the export:
What I am expecting is to export all the rows of the table, no matter is they are visualized at the current moment in the panel (otherwise I could use "print to PDF" in web browser directly, without cloning container, installing docker, run container, config it, etc.
It seems to me the tool is not getting the right height. I am attaching the docker log for better reference (look at line "Page height adjusted to: 800"):
I cloned just yesterday the ExportGrafanaDashboardToPDF, so it is the latest release.
I am using grafana Grafana v11.2.0 (c57667e448) but I was able to test it (with same result) on grafana Grafana v10.1.1 (0cfa76b22d)
I guess the problem is something around these lines of the grafana_pdf.js file
but I was not able to fix it.
Thanks in advance for the support.
Filippo
The text was updated successfully, but these errors were encountered: