-
Notifications
You must be signed in to change notification settings - Fork 153
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
Experimental: Support PDF rendering #487
Conversation
pageRanges: urlParams.get('pdf.pageRanges') ?? undefined, | ||
tagged: urlParams.get('pdf.tagged') === 'true', | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows for changing properties via URL eg:
path: options.filePath, | ||
}) | ||
} | ||
|
||
return page.screenshot({ path: options.filePath, fullPage: options.fullPageImage, captureBeyondViewport: options.fullPageImage || false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we wrap this in if(!isPDF ) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary given the if(isPDF) ...
case returns, but perhaps an else clause would be cleaner (I don't have any strong opinions here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I missed the return. na early return is better than if/else :)
Thanks for your work on this feature! I opened a PR to make some changes to it: #495 I'm working on updates to the reporting feature that will rely on that. I'll open the associated PRs soon. |
* Bump follow-redirects from 1.15.3 to 1.15.4 (#489) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Chore: Upgrade jimp and node (#492) * fix timeout and options * add scale * clean up * clean up * Update rendererv2.proto --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
See also: grafana/grafana#79612
http://localhost:3000/render/d/MP-Di9F7k/candlestick?orgId=1&kiosk=tv&from=1626214470464&to=1626216259472&width=1200&theme=light&encoding=pdf
http://localhost:3000/render/d/MP-Di9F7k/candlestick?orgId=1&kiosk=tv&from=1626214470464&to=1626216259472&width=1200&theme=dark&encoding=pdf
This does not change anything that would make rendering work better or look nice, just letting pdf files be pdfs rather than png files