Pay it forward:
At LEOCODE, we value software craftsmanship and being a part of an ever-growing community of developers. We share a strong belief that making the world a better place by programming is possible. Delivering products and solutions based on open-source software, it is natural for us to contribute back to the growth of the community we owe so much.
As a digitally savvy enterprise, we invest our time and resources in worthwhile OSS projects thus supporting others on their digital journey. We have come up with space for our talented software engineers to pursue their passions as they develop and share innovations to work for the greater good. These principles are our bedrock and set the standard for the way LEOCODE acts.
First of a series:
The following publication opens an upcoming series of blog posts, sharing our open-source solutions. We truly hope our work will prove beneficial for all of you that might be looking for technical aid or opportunity for self-education.
Puppeteer-service:
- Issue: An app requires to download a given website and save it in a graphical format, e.g. PNG or PDF. The input data for the file can be extracted either from an URL address or a HTML code.
- Existing solutions: An existing tool called Puppeteer is a nearly perfect fix for the issues, unfortunately, its system dependencies make the use difficult. It can be containerized into a Docker image but it would require building a new communication layer (API). Existing Docker images along with Puppeteer and Api, are designed to suit specific needs. It is difficult to find an image that would convert an HTML to PNG file.
- Our solution: Our goal was to create a complete Puppeteer image, capable of sharing the most commonly used actions for creating PNG and PDF files of given websites, as well as being ready to use in a variety of environments such as AWS Lambda.
- Current state: Converting HTML and URLs to PNG.
- Repository: The container with a server running Puppeteer which allows to render images and PDFs of given webpage or HTML code using simple HTTP API. Follow the link for the full documentation. https://github.com/leocode/puppeteer-service
Summary:
If you’re a tech-savvy software engineer, looking for non-standard technical solutions, be sure to subscribe to our newsletter. Following our mission of contributing back to the developer’s community, we’re going to post an insightful series of our own open-source solutions.
Bookmark our brand new page https://leocode.com/open-source/ to quickly find all the open-source-related publications in the near future.
Visit our GitHub profile for more:
We’re constantly expanding our GitHub library. Be sure to follow us at:
https://github.com/leocode/
Author: Mateusz Koteja