Convert from PDF

Convert your PDF document to Word, Excel, PowerPoint, and eBook formats. API provides an OCR option to produce searchable PDFs with copiable text from scanned documents as well.

Offers conversion with below output options:

  • Microsoft Word
  • Microsoft Excel
  • Microsoft PowerPoint
  • PDF with OCR
  • Text with OCR
  • ePUB
  • MOBI

Depending on the need Quality type can be set as Draft or High. High quality implements advanced OCR and costs 2 API calls per page.

Code Samples

Try the API in the language you prefer

  • C#
  • Java
  • JavaScript
  • PHP
  • Python
  • Ruby
// setup convertFromPdf object
var convertFromPdf = new ConvertFromPdf()
    // document
    Document = new Document()
        DocData = File.ReadAllBytes("myPdf.pdf"),
        Name = "myPdf.pdf",
    // action
    ConvertFromPdfAction = new ConvertFromPdfAction()
        OutputFormat = ConvertFromPdfActionOutputFormat.PdfOcr,
        QualityType = ConvertFromPdfActionQualityType.High

// conversion
var res = await Pdf4meClient.Pdf4me.Instance.ConvertFromPdfClient.ConvertFromPdfAsync(convertFromPdf);

// extract the generated PDF and write it to disk
byte[] generatedPdf = res.Document.DocData;
File.WriteAllBytes("generatedPdf.pdf", generatedPdf);
import base64
import datetime
import os
from pdf4me.client.pdf4me_client import Pdf4meClient
from pdf4me.client.convert_client import  ConvertClient
from pdf4me.model import ConvertFromPdf, Document, ConvertFromPdfAction
from pdf4me.helper.file_reader import FileReader

""" Pass token as argument """
pdf4me_client = Pdf4meClient(token='')

# setup the convert_client
convert_client = ConvertClient(pdf4me_client)

# create the convert_to_pdf object
convert_from_pdf = ConvertFromPdf(

# conversion
res = convert_client.convert_from_pdf(convert_from_pdf=convert_from_pdf)

# extracting the generated PDF
generated_pdf = base64.b64decode(res['document']['doc_data'])
# writing it to disk
with open('pdfOcr.pdf', 'wb') as f:

Important links

Swagger: Convert from PDF