PDF to HTML
Convert PDF documents to HTML format.
Endpoint
POST https://www.acrewity.com/api/services/execute
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
n8n Integration
This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity
Operations
Convert PDF to HTML
Convert PDF file to HTML with table detection and structure preservation
Operation ID: convert
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file |
file | Yes | - | PDF file to convert (Base64 encoded, with or without data URI prefix) |
include_styles |
boolean | No | true |
Include CSS styles in the HTML output |
Example Request
Convert PDF with Styles:
{
"service": "pdf-to-html",
"operation": "convert",
"parameters": {
"file": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv...",
"include_styles": true
}
}
Convert PDF without Styles:
{
"service": "pdf-to-html",
"operation": "convert",
"parameters": {
"file": "JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv...",
"include_styles": false
}
}
Example Response (convert)
{
"success": true,
"result": {
"data": {
"html": "<!DOCTYPE html>\n<html>\n<head>\n<style>body { font-family: Arial; }</style>\n</head>\n<body>\n<h1>Document Title</h1>\n<p>Content from the PDF...</p>\n</body>\n</html>",
"pageCount": 5,
"metadata": {
"title": "Annual Report 2024",
"author": "Company Inc.",
"creationDate": "2024-12-15T10:30:00.000Z"
}
}
},
"credits_used": 1
}
Get PDF Metadata
Extract metadata from a PDF without full conversion
Operation ID: metadata
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file |
file | Yes | - | PDF file to read metadata from (Base64 encoded) |
Example Request
Extract Metadata:
{
"service": "pdf-to-html",
"operation": "metadata",
"parameters": {
"file": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv..."
}
}
Example Response (metadata)
{
"success": true,
"result": {
"data": {
"title": "Annual Report 2024",
"author": "Company Inc.",
"subject": "Financial Summary",
"keywords": "finance, annual, report",
"creator": "Microsoft Word",
"producer": "PDF Library",
"creationDate": "2024-12-15T10:30:00.000Z",
"modificationDate": "2024-12-20T14:45:00.000Z",
"pageCount": 24
}
},
"credits_used": 1
}
More Examples
See Document Processing Examples for complete workflow examples including content extraction, web publishing, and document indexing.