Render HTML to PDF with RenderPDF.io

Seth ChenSeth Chen
2 min read

Hey guys,

I'm super excited to share with you all about my latest work - RenderPDF.io ๐Ÿ˜Ž

We all know that rendering HTML to PDF is not so fun and game.

You have to research a bunch of things, then try out a lot of CSS styling, and even have to install more libraries or deploy new stuff and manage them.

It's definitely time-consuming & hard to maintain, isn't it? But not anymore ๐Ÿฅฐ.

What is RenderPDF.io?

RenderPDF.io provides developer-friendly APIs to help people render their PDFs in seconds ๐Ÿš€.

Just send us the HTML content and we'll respond with the rendered PDF file ๐Ÿš€. Get rid of the hard & tedious work and focus on your features/delivery โญ๏ธ.

You can find us at:

Powered by the Chromium engine, enabling us to use any latest CSS styling and give you modern PDF files ๐Ÿš€.

We have some examples on the home page, check them out ๐Ÿ”ฅ.

Free Usage

Yes, Free users get 500 PDFs per month - the highest free usage compared to others out there ๐Ÿ˜Ž.

Examples

Integrate with RenderPDF.io using TypeScript

import axios from 'axios';

const httpClient = axios.create({
  baseUrl: 'https://renderpdf.io/api'
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
  },
});

export function renderPdf(htmlContent: string): Promise<string> {
  return httpClient.post('/pdfs/render-sync', {
    htmlContent,
    // add more options here if you need
  }).then((res) => res.data.fileUrl));
}

// a "Hello World" PDF โค๏ธ
const pdfUrl = await renderPdf('Hello World');

Integrate with RenderPDF.io using PHP & Laravel, using HTTP Client Facade

use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_API_TOKEN')
    ->asJson()
    ->post('https://renderpdf.io/api/pdfs/render-sync', [
        'htmlContent' => 'Render me a PDF now!!!',
        // add more options here if you need
    ]);

// Your PDF is ready sir :muscle:
$fileUrl = $response->json('fileUrl');

Upcoming Features of RenderPDF.io

Indeed, it is still under elevating process and there will be more and more features upcoming soon to make your life easier ๐Ÿฅฐ:

  • Free PDF templates ๐Ÿ‘€

  • Document Template management ๐Ÿ˜Ž

  • Template Editor ๐Ÿ”ฅ

  • and still thinking more hehe

Stays tuned.

Conclusion

Well, that's it. I hope you will like RenderPDF.io and give it a try, it is totally worth the try โค๏ธ.

Happy weekend and see you all on the next tech talk ๐Ÿ˜‰!

10
Subscribe to my newsletter

Read articles from Seth Chen directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Seth Chen
Seth Chen

develops awesome software, contributes to OSS, writes tech tips, and loves Vietnamese milk coffee!