28 karma · joined May 29, 2018 (8y ago) · 14 submissions
100% remote
Love building MVPs, both for myself and clients
comment 8y ago · link · parent
After that contract stopped I applied to about 20 jobs from job boards such as Weworkremotely and Remoteok with the proposition that I could work with them on a freelance base. I got only one callback out of those, did a technical interview and started working with them.
Since then I've switched several times, it gets easier as you build a network of people working remotely that can give you a tip once a position opens up and that will vouch for you.
comment 8y ago · link · parent
Page breaks are controlled by the CSS properties page-break-after, page-break-before and page-break-inside.
comment 8y ago · link · parent
I'm not caching at all since I do not want to store any potential confidential data on my servers. The main reason that it's fast is that there are several instances running Chrome headless behind a load balancer.
The main use case would indeed be to send HTML to the API instead of an URL. I just didn't add this use case to the landing page API tester, but it's definitely supported.
The i in APi is lowercased because I thought it looked cute :)
comment 8y ago · link · parent
Puppeteer would indeed come close in rendering quality. Improvements of using my solution over puppeteer are:
1) I tweaked Chrome headless to have the fonts available to ensure that typography renders as it should. Even emojis work!
2) you don't need to worry about installing and maintaining puppeteer and Chrome headless into your own infra
3) I didn't really make this very clear on my landing page so far, but I'll provide support to clients that have issues getting a certain document to render exactly like they want.
4) Not really a benefit yet since I wanted to launch with the MVP but soon I'll offer several options in the API that puppeteer itself doesn't offer such as multi-document PDFs, automated clickable terms of content for longer documents, etc.
comment 8y ago · link · parent
You're right, the most common use case would be that a client sends HTML instead of an URL to the endpoint. This way a PDF can be created of data that's not publicly exposed on the internet (think invoices, contracts, etc.)
I also don't store any of the data you send to the API, as to not further contribute to your GDPR nightmares.
comment 8y ago · link · parent
You are right that generating PDFs from HTML and Web Technologies is nothing new. Most existing PHP and node libs sadly don't provide great rendering once you have a document that consists of modern CSS and HTML or modern image formats such as SVG.
Puppeteer would indeed provide the same rendering quality but then you're responsible for the maintenance of the running instances. I'm hoping to make my user's life easier by taking this task out of their hands.
comment 8y ago · link · parent
The stack is Linux on Docker, running a tweaked version of headless Chrome with an API created in Node.
comment 8y ago · link · parent
This way your dev team would not have to invest any time at all in the creation of PDF documents. Shoot me a mail at the email address in my profile if you want to know more.
14.
Show HN: ThePDFApi, a Chrome Based PDF Generation API Hosted on AWS
41 points · by marcTPA · 8y ago · 36 comments