Send Markdown to generate a PDF Copy
POST {{url}}/api/v1/generate-pdf
This endpoint receives data in JSON format and outputs it as a PDF file.
On Qodex, save the PDF from the response by clicking the 'Save Response' button on the top right corner of the response tab and selecting 'Save to a file'.
Request Body
{"title"=>"Example Invoice", "type"=>"markdown", "data"=>[{"label"=>"Name", "content"=>"Sally Smith"}, {"content"=>"Lorem **ipsum** dolor sit _amet_...", "fontSize"=>12, "textColor"=>"#616161"}, {"content"=>"Lorem **ipsum** [dolor sit _amet_](https://useanvil.com)...", "fontSize"=>12, "textColor"=>"#616161"}, {"table"=>{"rows"=>[["Description", "Quantity", "Price"], ["4x Large Wigets", "4", "$40.00"], ["10x Medium Sized Widgets in dark blue", "10", "$100.00"], ["6x Small Widgets in white", "6", "$60.00"]], "columnOptions"=>[{"align"=>"left", "width"=>"60%"}, {"align"=>"center", "width"=>"100px"}, {"align"=>"right"}], "firstRowHeaders"=>true, "rowGridlines"=>true, "columnGridlines"=>true, "verticalAlign"=>"center"}}], "page"=>{"width"=>"612px", "height"=>"792px", "margin"=>"50px", "marginTop"=>"30px", "marginBottom"=>"30px", "marginLeft"=>"60px", "marginRight"=>"60px", "pageCount"=>"bottomCenter"}, "fontSize"=>16, "textColor"=>"#171717", "includeTimestamp"=>true, "logo"=>{"src"=>"https://example.com/mtnlogo.png", "maxWidth"=>200, "maxHeight"=>200}}