Convert your files with our online file conversion API

The ConvertAPI provides online API for creating PDF and Images from various sources like Word document, web pages or raw HTML codes. In just few minutes you can integrate it into your application and use it easily. Return to APIs list.

Do you have file format which is not supported by our ConvertApi online service? Just contact us and we will add it for you.

  1. Convert Images to PDF API

    The API for converting Images to PDF files. Most popular image formats are supported like Jpg, Png, Tiff, Bmp, Gif, Mdi and many more.

    Rest Api .Net Library

REST API Documentation

An API call is made by sending an HTTP request with parameters passed as POST data to the Image2Pdf service API URI:

http://do.convertapi.com/Image2Pdf

Converted file is returned as HTTP response stream, additional data are available in HTTP response header. If API call is succeeded HTTP response status code will be 200 OK, if fail then 400 Bad Request.

http://do.convertapi.com/Image2Pdf/json

Converted file and additional data are returned as JSon object. A file is encoded using Base64 encoding.

Below are properties supported by conversion api. The properties marked with "›" are write properties, they accepts values. The properties which has "‹" marker are read properties, they returns values.

Properties
NameTypeSummary
Authentication
ApiKey integer
API Key should be passed if you purchased membership with credits. Please login to your control panel to find out your API Key http://www.convertapi.com/control-panel
Conversion Parameters
Timeout = 300 integer
Conversion timeout in seconds. The minimum value is 5 seconds and maximum is 600 seconds (10 minutes)
AlternativeParser = false boolean
If some objects are missing in converted Pdf files from original source files this option can be enabled to improve conversion. The option process files much slower and should be disabled by default.
OutputFormat = pdf string (collention)
pdf - portable document format
pdfa - portable document format specialized for the digital preservation of electronic documents.
png - png image.
jpg - jpg image.
tif - tiff image.
Set the output file format. The default output format is Pdf. If output format is set to Png or Jpg a image file will be created for every converted document page and returned as zip file.
InputFormat string (collention)
avs - AVS X image
bmp - OS/2 Bitmap or MS Windows Bitmap image
dcx - IBM PC multi-page Paintbrush
dib - MS Windows Device Independent Bitmap
dpx - Digital Moving Picture Exchange
fax - Group 3 FAX encoding
fits - Flexible Image Transport System
fpx - FlashPix Format
gif - CompuServe graphics interchange format
ico - OS/2 or MS Windows Icons
iptc - Newswire profile
jbig - Joint Bi-level Image experts Group interchange format
jp2 - JPEG-2000 JP2 File Format Syntax
jpeg - Joint Photographic Experts Group JFIF format
jpg - Joint Photographic Experts Group JFIF format
mdi - MS Office Document Imaging
miff - Magick image format
mng - Multiple-image Network Graphics
mpc - Magick Persistent Cache image format
mtv - MTV Raytracing image format
otb - On-the-air Bitmap
pbm - Portable Bitmap
pcd - Kodak PhotoCD - Base/16, Base/4 and Base only
pcds - Kodak PhotoCD - Base/16, Base/4 and Base only
pct - MacIntosh PICT
pcx - PC PaintBrush
pgm - Portable GrayMap
pict - Apple Macintosh QuickDraw
png - Portable Network Graphics
pnm - Portable Any Bitmap
ppm - Portable PixelMap
psd - Adobe Photoshop
p7 - Xv visual schnauzer format
ras - Raster Sun Microsystems
rgba - Raw red, green, blue, and matte samples
sun - Raster SunMicrosystems
tga - TrueVision Targa
tiff - Tagged Interchange Format
vicar - V.I.C.A.R. Image format
vid - Visual Image Directory
viff - Khoros Visualization image
wmf - Windows Meta File
xbm - X Windows system bitmap, black and white only
xpm - X Windows system pixmap file (color)
xwd - X Windows system window dump file (color)
The supported source file formats. In most cases you don't need to set up this parameter because input file format will be detected from submited file name automatically.
Credits Information
CreditsLeft integer
Return number of remaining credits. Only available when ApiKey is provided.
CreditsCost = 2 integer
The cost of credits for one conversion.
Output Result
Result boolean
Conversion result. Return True if conversion successful, otherwise False.
Error string
Contain information about conversion failure. Only available when Result = False.
FileSize integer
Converted file size in bytes.
StoreFile = false boolean
Store file on server and return url to file instead of file stream response. File will be available for 24 hours.
FileUrl string
Converted file url to download from a server. Only available when StoreFile = True.
File bytes
If JSon object is used as output then a file will be encoded using Base64 encoding.
OutputFileName string
Converted output file name. If parameter is not set the filename will be generated automatically.
PDF Options
DocumentTitle string
Set the title of the generated Pdf file. If value is not set a source document title is used instead.
DocumentSubject string
Set the subject of the generated Pdf file. If value is not set a source document subject is used instead.
DocumentAuthor string
Set the author of the generated Pdf file. If value is not set a source document author is used instead.
DocumentKeywords string
Set the keywords of the generated Pdf file. If value is not set a source document keywords is used instead.