FileToPDF
App · 3 actions
Convert a file URL, HTML or Markdown to PDF and return its base64 content and conversion metadata.
Actions
| Action | What it does |
|---|---|
| Convert file | Convert file. |
| Convert html | Convert html. |
| Convert markdown | Convert markdown. |
Convert file
Convert file.
Inputs
- Url
urltextRequired - Public URL of the file to convert.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"credits_remaining": 1,
"credits_used": 1,
"filename": "example",
"pages": 1,
"pdf": "example",
"size_bytes": 1
},
"status": "example"
}
}Convert html
Convert html.
Inputs
- Html
htmltextRequired - The html to convert.
- Css
csstext - Additional CSS styles.
- Landscape
landscapetrue/false - Use landscape pages.
- Print background
print_backgroundtrue/false - Include background colours and images.
- Paper width
paper_widthnumber - Size in inches.At least 0.
- Paper height
paper_heightnumber - Size in inches.At least 0.
- Margin top
margin_topnumber - Size in inches.At least 0.
- Margin bottom
margin_bottomnumber - Size in inches.At least 0.
- Margin left
margin_leftnumber - Size in inches.At least 0.
- Margin right
margin_rightnumber - Size in inches.At least 0.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"credits_remaining": 1,
"credits_used": 1,
"filename": "example",
"pages": 1,
"pdf": "example",
"size_bytes": 1
},
"status": "example"
}
}Convert markdown
Convert markdown.
Inputs
- Markdown
markdowntextRequired - The markdown to convert.
- Css
csstext - Additional CSS styles.
- Landscape
landscapetrue/false - Use landscape pages.
- Print background
print_backgroundtrue/false - Include background colours and images.
- Paper width
paper_widthnumber - Size in inches.At least 0.
- Paper height
paper_heightnumber - Size in inches.At least 0.
- Margin top
margin_topnumber - Size in inches.At least 0.
- Margin bottom
margin_bottomnumber - Size in inches.At least 0.
- Margin left
margin_leftnumber - Size in inches.At least 0.
- Margin right
margin_rightnumber - Size in inches.At least 0.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"credits_remaining": 1,
"credits_used": 1,
"filename": "example",
"pages": 1,
"pdf": "example",
"size_bytes": 1
},
"status": "example"
}
}