API Documentation

How to obtain API Key?

  • Login to your account or create a new account if you don't have one.
  • Create a new application fom Applications page
  • You will find the API Key automatic generated with the app you have created.
  • Don't share your API Keys with any one.
  • Create a separate application for every project to get a different API key.

Convert Web page to PDF file by URL

Method POST
URL http://apiapp.net/api/pdf
URL Params -
DATA Params "key" String Required Your API Key.
"url" String Required Page URL you want to convert to PDF.
"options[]" Array Optional Extra option for PDF file.

PDF file Options ( Optional )

Option Value Description
options[page-size]
a0 (841 × 1189 mm, 8.26 × 11.69 inches)
a1 (594 × 841 mm, 23.4 × 33.1 inches)
a2 (420 × 594 mm, 16.5 × 23.4 inches)
a3 (298 × 420 mm, 11.7 × 16.5 inches)
a4 (210 × 298 mm, 8.3 × 11.7 inches)
a5 (148 × 210 mm, 5.8 × 8.3 inches)
a6 (105 × 148 mm, 4.1 × 5.8 inches)
a7 (74 × 105 mm, 2.9 × 4.1 inches)
a8 52 × 74 mm, 2.0 × 2.9 inches)
a9 (37 × 52 mm, 1.5 × 2.0 inches)
b0 (1000 × 1414 mm, 39.4 × 55.7 inches)
b1 (707 × 1000 mm, 27.8 × 39.4 inches)
b2 (500 × 707 mm, 19.7 × 27.8 inches)
b3 (353 × 500 mm, 13.9 × 19.7 inches)
b4 (250 × 353 mm, 9.8 × 13.9 inches)
b5 (176 × 250 mm, 6.9 × 9.8 inches)
letter (216 × 279 mm, 8.5 × 11 inches)
legal (216 × 356 mm, 8.5 × 14 inches)
ledger (432 × 279 mm, 17 × 11 inches)
Define PDF page size
Default "a4"
options[orientation] portrait
landscape
Define PDF page orientation
Default "portrait"
options[viewport-size] 800x800
1366x800
1280x1024
Define Browser viewport size on converting.
Default "800x800"
options[zoom] From 0.1 to 2 Page zoom on converting.
Default "1"
options[margin-top] In Millimeters (mm) Set the page top margin.
Default "10"
options[margin-bottom] In Millimeters (mm) Set the page bottom margin.
Default "10"
options[margin-right] In Millimeters (mm) Set the page right margin.
Default "10"
options[margin-left] In Millimeters (mm) Set the page left margin.
Default "10"
options[javascript-delay] In Milliseconds (ms) Wait some milliseconds for javascript finish.
Default "200"
options[image-quality] From 0 to 100 When file contains jpeg images you can use this quality
Default "94"
options[copies] From 1 to 1000 How many copies you want in the PDF file
Default "1"
options[disable-javascript]
options[enable-javascript]
1 Empty option if you want to disable all javascripts.
Default enable-javascript=""
options[no-background]
options[background]
1 Empty option if you want to hide file background.
Backgrounds Enabled by Default background
options[grayscale] 1 Empty option if you want to convert as grayscale.

PDF Header ( Optional )

Option Value Description
options[header-html]
❮!DOCTYPE html❯
❮img src="http://path-to-image.png" style="width:100%; height:100px"❯
Add a header for every page on PDF file. "Rendered HTML"
options[header-font-name] Arial Set header font name.
default "Arial"
options[header-font-size] 12 Set header font size.
default "12"
options[header-center]
options[header-left]
options[header-right]
1 Define align for header text
options[header-line]
options[no-header-line]
1 Display line below the header. default "no-header-line"
options[header-spacing]
In Millimeters (mm) Spacing between header and content in mm.
default "0"
Option Value Description
options[footer-html]
❮!DOCTYPE html❯
❮img src="http://path-to-image.png" style="width:100%; height:100px"❯
Add a footer for every page on PDF file. "Rendered HTML"
options[footer-font-name] Arial Set footer font name.
default "Arial"
options[footer-font-size] 12 Set footer font size.
default "12"
options[footer-center]
options[footer-left]
options[footer-right]
1 Define align for footer text
options[footer-line]
options[no-footer-line]
1 Display line below the footer. default "no-footer-line"
options[footer-spacing]
In Millimeters (mm) Spacing between footer and content in mm.
default "0"

Convert Web page to Image file by URL

Method POST
URL
http://apiapp.net/api/png
http://apiapp.net/api/jpg
http://apiapp.net/api/jpeg
URL Params -
DATA Params "key" String Required Your API Key.
"url" String Required Page URL you want to convert to PDF.
"options[]" Array Optional Extra option for PDF file.

Image file Options ( Optional )

Option Value Description
options[width] Integer Define image width in pixel.
Default "800"
options[height] Integer Define image height in pixel.
Default "800"
options[zoom] From 0.1 to 2 Page zoom on converting.
Default "1"
options[javascript-delay] In Milliseconds (ms) Wait some milliseconds for javascript finish.
Default "200"
options[disable-javascript]
options[enable-javascript]
1 Empty option if you want to disable all javascripts.
Default enable-javascript=""

Convert HTML Code to PDF file

Method POST
URL http://apiapp.net/api/pdf
URL Params -
DATA Params "key" String Required Your API Key.
"html" String Required Rendered HTML you want to convert to PDF.
"options[]" Array Optional Extra option for PDF file.
All Options of PDF available.

باستخدامك لهذا الموقع فأنت توافق علي قبول ملفات تعريف الإرتباط الخاصه به بالإضافة إلى جميع الشروط والأحكام الخاصة بالخدمة.
[ الشروط والأحكام ]