Comments (3)
Hey @gg-gaborginter,
I was playing with viewportWidth
and viewportHeight
, and I was not able to make them work.
For instance, increasing the value of viewportWidth
did not make the website CSS "adapt", but instead it kept the same width (e.g., website sticked to the left of the screenshot) while capturing more "background". viewportHeight
was working OK, meaning I was able to take screenshots of a portion of the site.
Also, keep in mind that screenshots are not a first class citizen in Gotenberg, but merely a tool to make a sort of "preview" of the PDF conversion result.
from gotenberg.
Hi @gulien,
We are at the moment using a self-built, similar setup for both purposes: PDF and screenshot generation. With screenshots, as the window size can't be influenced anyhow else on the Chromium API, we set the viewport sizes instead and restricted the width of the page body through CSS.
I made some tests with the HTML viewport meta tag, by fixing the width and height explicitly, but without the viewport setting on the Chromium page instance, the screenshot was made of the whole window size (lots of white space all around the desired content).
I understand that the screenshot feature is not a first-class citizen. It would be nice, though, to have the option to control some of the settings that Chromium offers. I'm willing to contribute, so I created a pull request, as well: #787
from gotenberg.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from gotenberg.
Related Issues (20)
- 8.2.0 regression in /forms/pdfengines/convert HOT 11
- OpenAPI docs for Gotenberg 8.x? HOT 1
- every morning Oman time the PDF rendering is having break down! with Maximum CPU Usage HOT 1
- Failed to send response to webhook localhost url
- [Feature Request] - Add Version to Health Check HOT 3
- v8.2.1 still produces tagged pdf HOT 7
- How to set a PDF cover?
- Convert into PDF/A & PDF/UA route does not work with many pdfs HOT 4
- gotenberg 8.2.0 failed on conversion to pdf "lock long-running LibreOffice listener: start long-running LibreOffice listener: LibreOffice listener socket not available: context deadline exceeded" HOT 3
- LibreOffice can convert more extensions HOT 3
- Feature: Add possibility to set screenshot size HOT 1
- Plan to support .eml file conversion to PDF HOT 3
- Maximum capacity of an array (in elements) is 8191 HOT 2
- Excel to PDF Page size issue HOT 2
- (LibreOffice) `convert to PDF: unix process error: wait for unix process: exit status 5` HOT 1
- How to change libreoffice api Fonts in docker Containers ? HOT 3
- Add Version (/version) Route HOT 5
- Update TCM's Go-client HOT 3
- context deadline exceeded with default configuration HOT 2
- Generate bookmarks to each PDF starting point when merging multiple PDF files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotenberg.