niccokunzmann / open-web-calendar

Embed a highly customizable web calendar into your website using ICal source links
https://open-web-calendar.quelltext.eu
GNU General Public License v2.0
208 stars 67 forks source link

Export as image #303

Closed flaschenge1st closed 6 months ago

flaschenge1st commented 6 months ago

Hi there!

Is it possible to "export" the result as an image? Maybe as a feature request? Right now, it's only possible to render the calendar and screenshot the view.

Thank you for any hints!


We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.

Fund with Polar

vmario89 commented 6 months ago

i guess this will not be a part of the core functionality. Even programs like Grafana do not render their stuff by own. They use some external lib. Maybe use https://phantomjs.org/api/webpage/method/render.html

to render by command, you can use chrome/chromium for example:

"%ProgramFiles%\Google\Chrome\Application\chrome.exe" --incognito --headless=old --disable-gpu --screenshot=%cd%\calendar.png --window-size=600,800 --virtual-time-budget=15000 --timeout=5000 "https://owc.somewhere.org/calendar.html?url=YOURLURL"

you may need to mess up with the headless and gpu switches to make it work. it depends ;-)

flaschenge1st commented 6 months ago

OK, thank you! I already feared something like this: I guess most of the (cheap) web site packages do not feature a headless chrome install. But that's not OWCs problem, I see! :-)

I close this as "won't fix" - if anyone wants to re-open and fix it: Yay, thank you!

niccokunzmann commented 6 months ago

I was wondering if there is already a service online that can render websites as images. I would have looked for website2png. Hm, I only see this: https://github.com/karanokara/website2png https://www.freeconvert.com/webpage-to-png https://www.i2img.com/url-to-image

I think, as a service this does not need to be tied to the open web calendar but can be used for all other websites, too.

flaschenge1st commented 6 months ago

@niccokunzmann Thank you for the links! I'll give it a try! I found https://htmlcsstoimage.com which also seems to be some kind of solution.