FileToPDF

App · 3 actions

Convert a file URL, HTML or Markdown to PDF and return its base64 content and conversion metadata.

Actions

ActionWhat it does
Convert fileConvert file.
Convert htmlConvert html.
Convert markdownConvert markdown.

Convert file

Convert file.

Inputs

UrlurltextRequired
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

HtmlhtmltextRequired
The html to convert.
Csscsstext
Additional CSS styles.
Landscapelandscapetrue/false
Use landscape pages.
Print backgroundprint_backgroundtrue/false
Include background colours and images.
Paper widthpaper_widthnumber
Size in inches.At least 0.
Paper heightpaper_heightnumber
Size in inches.At least 0.
Margin topmargin_topnumber
Size in inches.At least 0.
Margin bottommargin_bottomnumber
Size in inches.At least 0.
Margin leftmargin_leftnumber
Size in inches.At least 0.
Margin rightmargin_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

MarkdownmarkdowntextRequired
The markdown to convert.
Csscsstext
Additional CSS styles.
Landscapelandscapetrue/false
Use landscape pages.
Print backgroundprint_backgroundtrue/false
Include background colours and images.
Paper widthpaper_widthnumber
Size in inches.At least 0.
Paper heightpaper_heightnumber
Size in inches.At least 0.
Margin topmargin_topnumber
Size in inches.At least 0.
Margin bottommargin_bottomnumber
Size in inches.At least 0.
Margin leftmargin_leftnumber
Size in inches.At least 0.
Margin rightmargin_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"
  }
}

On this page