Method | POST |
---|---|
URL | /url-to-pdf |
Headers | content-type: application/json |
Request Type | json |
Attribute | Description | Type | Required | Option |
---|---|---|---|---|
file_name | File name, including the extension, e.g. example.pdf | text | false | |
page_size | Default: `A4`. | text | false | A4 A3 A5 Letter Legal Tabloid B5 Custom Size : Height: text (e.g. 576) and Width: text (e.g. 360) |
margin_top | Margin top in mm e.g. 1mm Default: 0mm | text | false | |
margin_right | Margin right in mm e.g. 1mm Default: 0mm | text | false | |
margin_bottom | Margin bottom in mm e.g. 1mm Default: 0mm | text | false | |
margin_left | Margin left in mm e.g. 1mm Default: 0mm | text | false | |
url | url | text | false | |
custom_size_height | e.g. 100mm or 100 | text | false | |
custom_size_width | e.g. 100mm or 100 | text | false |
curl -X POST 'https://pdf.msquare.pro/url-to-pdf?appName=DocCrafter' \
-H 'content-type: application/json' \
-H 'authorization: ***' \
-d '{
"url": "https://en.wikipedia.org/wiki/PDF",
"file_name": "new.pdf",
"page_size": "A4",
"margin_top": "1mm",
"margin_left": "1mm",
"margin_right": "1mm",
"margin_bottom": "1mm"
}'
Method | POST |
---|---|
URL | /html-to-pdf |
Headers | content-type: application/json |
Attribute | Description | Type | Required | Options |
---|---|---|---|---|
url | HTML File URL | text | true | |
pdf_file_name | File name, including the extension, e.g. invoice.pdf | text | false | |
page_size | Default: `A4`. | text | false | A4 A3 A5 Letter Legal Tabloid B5 Custom Size : Height: text (e.g. 576) and Width: text (e.g. 360) |
margin_top | Margin top in mm e.g. 1mm Default:0mm | text | false | |
margin_right | Margin right in mm e.g. 1mm Default: 0mm | text | false | |
margin_bottom | Margin bottom in mm e.g. 1mm Default: 0mm | text | false | |
margin_left | Margin left in mm e.g. 1mm Default: 0mm | text | false | |
custom_size_height | Margin bottom in mm e.g. 1mm Default: 0mm | text | false | |
custom_size_width | Margin left in mm e.g. 1mm Default: 0mm | text | false |
Method | POST |
---|---|
URL | /html-to-pdf |
Headers | content-type: text/html |
Attribute | Description | type | Required | |
---|---|---|---|---|
file_name | File name, including the extension, e.g. invoice.pdf | text | false | |
page_size | Default: `A4`. | text | false | |
margin_top | Margin top in mm e.g. 1mm Default: 0mm | text | false | |
margin_right | Margin right in mm e.g. 1mm Default: 0mm | text | false | |
margin_bottom | Margin bottom in mm e.g. 1mm Default: 0mm | text | false | |
margin_left | Margin left in mm e.g. 1mm Default: 0mm | text | false | |
custom_size_height | Margin left in mm e.g. 1mm Default: 0mm | text | True | |
custom_size_width | Margin left in mm e.g. 1mm Default: 0mm | text | True |
curl -X POST 'https://pdf.msquare.pro/html-to-pdf?appName=DocCrafter&page_size=A4&margin_top=1mm&margin_left=1mm&margin_right=1mm&margin_bottom=1mm&pdf_file_name=new.pdf' \
-H 'content-type: text/html' \
-H 'authorization: ***' \
-d 'HTML Content'
Method | POST |
---|---|
URL | /csv-to-pdf |
Headers | content-type: multipart/form-data |
Attribute | Description | Type | Required | Options |
---|---|---|---|---|
csv_url | CSV File URL | text | true | |
fileName | File name, including the extension, e.g. example.csv | text | true | file:name |
header_text_align | text | false | LEFT RIGHT CENTER MIDDLE JUSTIFY |
|
header_text_color | Hex Color Code e.g. `#000000` | text | false | |
header_background_color | Hex Color Code e.g. #000000 | text | false | |
data_text_align | text | false | LEFT RIGHT MIDDLE JUSTIFY CENTER |
|
data_text_color | Hex Color Code e.g. #000000 | text | false | |
data_background_color | Hex Color Code e.g. #000000 | text | false | |
table_grid_color | Hex Color Code e.g. #000000 | text | false | |
font_name | text | false | Helvetica-Bold Helvetica Times-Roman or Courier |
|
font_size | e.g. 10 | number | false | |
page_size | Default: A4 | text | false | A4 A3 A5 Letter Legal Tabloid B5 100x200 |
Method | POST |
---|---|
URL | /csv-to-pdf |
Headers | content-type: multipart/form-data |
Attribute | Description | Type | Required | Options |
---|---|---|---|---|
file | CSV file | file | true | |
header_text_align | text | false | LEFT RIGHT CENTER MIDDLE JUSTIFY |
|
header_text_color | Hex Color Code e.g. `#000000` | text | false | |
header_background_color | Hex Color Code e.g. #000000 | text | false | |
data_text_align | text | false | LEFT RIGHT MIDDLE JUSTIFY CENTER |
|
data_text_color | Hex Color Code e.g. #000000 | text | false | |
data_background_color | Hex Color Code e.g. #000000 | text | false | |
table_grid_color | Hex Color Code e.g. #000000 | text | false | |
font_name | text | false | Helvetica-Bold Helvetica Times-Roman or Courier |
|
font_size | e.g. 10 | number | false | |
page_size | Default: A4 | text | false | A4 A3 A5 Letter Legal Tabloid B5 100x200 |
curl -X POST 'https://pdf.msquare.pro/csv-to-pdf?appName=DocCrafter' \
-H 'content-type: multipart/form-data' \
-H 'authorization: ***' \
-d '{
"csv_url": "https://people.sc.fsu.edu/~jburkardt/data/csv/nile.csv",
"font_name": "Helvetica-Bold",
"font_size": 6,
"page_size": "A4",
"data_text_align": "LEFT",
"data_text_color": "#000000",
"table_grid_color": "#000000",
"header_text_align": "CENTER",
"header_text_color": "#000000",
"data_background_color": "#000000",
"header_background_color": "#000000"
}'
Method | POST |
---|---|
URL | /excel-to-pdf |
Headers | Content-Type: multipart/form-data |
Attribute | Description | Type | Required | Options |
---|---|---|---|---|
excel_file_url | url of excel file | text | true | |
header_text_align | text | false | LEFT RIGHT CENTER MIDDLE JUSTIFY |
|
header_text_color | Hex Color Code e.g. `#000000` | text | false | |
header_background_color | Hex Color Code e.g. #000000 | text | false | |
data_text_align | text | false | LEFT RIGHT MIDDLE JUSTIFY CENTER |
|
data_text_color | Hex Color Code e.g. #000000 | text | false | |
data_background_color | Hex Color Code e.g. #000000 | text | false | |
table_grid_color | Hex Color Code e.g. #000000 | text | false | |
font_name | text | false | Helvetica-Bold Helvetica Times-Roman or Courier |
|
font_size | e.g. 10 | number | false | |
page_size | Default: A4 | text | false | A4 A3 A5 Letter Legal Tabloid B5 100x200 |
Method | POST |
---|---|
URL | /excel-to-pdf |
Headers | Content-Type: multipart/form-data |
Attribute | Description | Type | Required | Options |
---|---|---|---|---|
file | Excel file | file | true | |
header_text_align | text | false | LEFT RIGHT CENTER MIDDLE JUSTIFY |
|
header_text_color | Hex Color Code e.g. `#000000` | text | false | |
header_background_color | Hex Color Code e.g. #000000 | text | false | |
data_text_align | text | false | LEFT RIGHT MIDDLE JUSTIFY CENTER |
|
data_text_color | Hex Color Code e.g. #000000 | text | false | |
data_background_color | Hex Color Code e.g. #000000 | text | false | |
table_grid_color | Hex Color Code e.g. #000000 | text | false | |
font_name | text | false | Helvetica-Bold Helvetica Times-Roman or Courier |
|
font_size | e.g. 10 | number | false | |
page_size | Default: A4 | text | false | A4 A3 A5 Letter Legal Tabloid B5 100x200 |
curl -X POST 'https://pdf.msquare.pro/excel-to-pdf?appName=DocCrafter' \
-H 'content-type: multipart/form-data' \
-H 'authorization: ***' \
-d '{
"font_name": "Helvetica-Bold",
"font_size": 6,
"page_size": "A4",
"excel_file_url": "https://www.cmu.edu/blackboard/files/evaluate/tests-example.xls",
"data_text_align": "LEFT",
"data_text_color": "#000000",
"table_grid_color": "#000000",
"header_text_align": "CENTER",
"header_text_color": "#000000",
"data_background_color": "#000000",
"header_background_color": "#000000"
}'