logo

Getting Started

What is pdfg?

pdfg is an API service for converting HTML to PDF. Using a serverless architecture, it provides a low-cost and scalable PDF generation environment.

How to Use

1. Create an Account

Create an account at https://pdfg.net/signup. Account creation requires the following steps:

  • Enter email and password
  • Check verification email
  • Click the link in the email to complete verification
  • Login at https://pdfg.net/signin

2. Get API Key

After logging in, you'll see an automatically created "First Project" in the dashboard. You can use this project's API key to make your first API request.

3. Make API Request

Here's an example of an API request using cURL:

curl --location 'https://api.pdfg.net/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{"html": "<h1>Hello World</h1>"}' \
--output pdfg.pdf

We also provide sample code in other programming languages. Please check the one that matches your environment.

Features of pdfg

pdfg provides a single endpoint POST https://api.pdfg.net/v1. This endpoint has the following capabilities:

  • Accepts HTML and options in JSON format
  • Returns generated PDF as binary data

While the generated PDF data can be stored in storage or downloaded by users, pdfg focuses specifically on PDF generation as a specialized service.