Extraction
- AI Invoice Parser
- Document Parser
- Extract Attachment
Editing
- PDF Add
- PDF Search Text and Replace
- PDF Search and Delete Text
PDF Conversion
- PDF to CSV
- PDF to JSON
- PDF to Text
- PDF to Excel
- PDF to XML
- PDF to HTML
- PDF to Image
- PDF from Document
- PDF from Image
- PDF from URL
- PDF from HTML
- PDF from Email
Excel Conversion
- Convert from Excel
PDF Merging & Splitting
- Merge
- PDF Split
Forms
- PDF Info Reader
Find & Search
- PDF Find
- PDF Change Text Searchable
Document, File & System
- PDF Compress
- PDF Optimize (DEPRECATED)
- PDF Info Reader
- Background & Job Check
- Get Account Balance Info
- Document Classifier
- Email
- File Upload
- PDF Add/Remove Password
Pages
- PDF Delete Pages
- PDF Rotate
Barcodes
- Barcode
PDF from HTML
Return All Templates
Create PDF’s from HTML template input.
GET /templates/html
Once you have obtained a template then use the PDF from HTML API with the required templateId & templateData parameters defined.
Use the dashboard to manage your HTML to PDF Templates.
Query parameters
No query parameters accepted.
Responses
Parameter | Type | Description |
---|---|---|
templates | array[object] | |
remainingCredits | integer | Number of credits remaining in the account |
credits | integer | Number of credits consumed by the request |
Example
Payload
To see the request size limits, please refer to the Request Size Limits.
Example
Response
To see the main response codes, please refer to the Response Codes page.
Copy
Ask AI
{
"id": 1,
"type": "system",
"title": "General Invoice Template",
"description": "sample invoice template showcasing use of Mustache templates syntax for generating invoices",
"body": "<!doctype html>\r\n<html lang=\"en-US\">\r\n<head>\r\n<title>Invoice </title> \r\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css\" integrity=\"sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn\" crossorigin=\"anonymous\">\r\n</head> \r\n<body>\r\n \r\n <div style=\"border-width: 3px;border-style: solid; border-color: #008000;border-radius: 8px; color: #008000; opacity:0.4; position: absolute; z-index: 1; left:80%; top:3%; font-size: 60pt;transform: rotate(-20deg)\">\r\n PAID </div>\r\n \r\n \r\n <div class=\"container\">\r\n <div class=\"\">\r\n <div class=\"\">\r\n \r\n <!-- invoice: header begin-->\r\n <div class=\"row col-md-12\">\r\n <div class=\"col col-md-6\">\r\n <div class=\"font-weight-bold\"></div>\r\n\r\n <div class=\"\"></div>\r\n <div class=\"\"></div>\r\n <div class=\"\"></div>\r\n <div class=\"\"></div>\r\n </div>\r\n <div class=\"col col-md-6\">\r\n <div class=\"\">\r\n <div class=\"\">\r\n <span class=\"font-weight-bold\">Invoice Number:</span> \r\n </div>\r\n <div class=\"\">\r\n <span class=\"font-weight-bold\">Invoice Date:</span> \r\n </div>\r\n <div class=\"\">\r\n <span class=\"font-weight-bold\">Invoice Due Date:</span> \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n<div class=\"row col-md-12\">\r\n <div class=\"col col-md-6\"></div>\r\n\r\n <div class=\"col col-md-6\">\r\n <div class=\"font-weight-bold footer-title\">BILL TO</div>\r\n <div class=\"\">\r\n <div class=\"\"><strong>Name:</strong> </div>\r\n <div class=\"\"><strong>Company:</strong> </div>\r\n <div class=\"\"><strong>Address:</strong> </div>\r\n <div class=\"\"><strong>Email:</strong> </div>\r\n </div>\r\n </div> \r\n </div>\r\n \r\n <div class=\"row col-md-12\">\r\n <div class=\"col col-md-12\">\r\n <table class=\"table table-striped\" cellspacing=\"0\">\r\n <thead>\r\n <tr class=\"table-head\">\r\n <th class=\"text-left\">Item</th>\r\n <th class=\"text-right\">Price</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n \r\n <tr>\r\n <td class=\"text-left\"></td>\r\n <td class=\"text-right\"></td>\r\n </tr>\r\n \r\n </tbody>\r\n </table> \r\n </div> \r\n\r\n </div>\r\n <div class=\"row col-md-12\">\r\n <div class=\"col col-md-6\">\r\n </div>\r\n <div class=\"col col-md-6 text-right\">\r\n <div style=\"margin-bottom: 10px;\">Discount: <span class=\"amount\"></span></div>\r\n <div style=\"margin-bottom: 10px;\">Tax: <span class=\"amount\"></span></div>\r\n <div class=\"font-weight-bold footer-title\">TOTAL: <span class=\"total-amount amount font-weight-bold\"></span></div> \r\n </div>\r\n \r\n </div>\r\n </div> \r\n </div>\r\n </div>\r\n <div class=\"container text-muted\"></div>\r\n </div>\r\n</body>\r\n</html>\r\n",
"remainingCredits": 99204002,
"credits": 2
}
Code Samples
Copy
Ask AI
curl --location --request GET 'https://api.pdf.co/v1/templates/html/1' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *******************' \
--data-raw ''
Copy
Ask AI
curl --location --request GET 'https://api.pdf.co/v1/templates/html/1' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *******************' \
--data-raw ''
Assistant
Responses are generated using AI and may contain mistakes.