Questions tagged [convertapi]

ConvertAPI is a high-performance 200+ file format conversion and manipulation REST API service. It can be integrated into any application or platform using either our SDK libraries or plain HTTP requests. Use this tag for questions related to the ConvertAPI service. Please include all relevant tags on your question, e.g., programming language, file formats, etc.

ConvertAPI is a fast and fault-tolerant web service used by software developers to convert between MS Office, Open Office, and iWorks stack, as well as HTML documents, images, manipulate PDF files, and numerous other formats. Being a RESTful API, the service can be used with any programming language — C#, Java, Ruby, Python, PHP, JavaScript, Node.js, Kotlin, Go, etc.

ConvertAPI boasts 99.99% uptime since its launch in 2011. Such robustness is achieved due to the globally distributed, highly available platform, which can scale up or down to effectively process any amount of traffic. ConvertAPI is fully GDPR compliant.

You can find all supported file formats and conversions here: https://www.convertapi.com/doc/file-formats.

ConvertAPI provides official API libraries for all your favorite languages and frameworks:

We encourage you to build custom conversion workflows for multiple-stage file processing. This best-practice-driven REST API approach improves performance and gives you full control over file processing at any stage of the flow. You can also create ConvertAPI workflows on Zapier. Feel free to post Zapier related issues on SO too.

80 questions
4
votes
2 answers

Convert a gdoc into image

is there a way to create an image (e.g. a png) from a google document? I really mean an image, not just a pdf. GetAS only creates pdf, but returns an error if contentType is set to image/png or other equivalent formats. My (actually trivial) code…
3
votes
1 answer

Compress PDF file in Google Script

How to compress a pdf file in a Google Script ? I already use convertapi to merge pdf files, successfuly. But I try, unsuccessfuly, to compress the final pdf file Code OK for MERGE var file = DriveApp.getFileById(idPDF1); formData['Files[' + index +…
2
votes
1 answer

`Bad Value` when connecting to an external API in google app script

Trying to fetch data from the ConvertAPI's web to jpg but the program throws an error for a Bad Value. Here's my code : const url = 'https://v2.convertapi.com/convert/web/to/png?Secret=...' const prams = [ { "Name": "Url", "Value":…
Vayun
  • 95
  • 1
  • 10
2
votes
1 answer

Merge PDF in ConvertAPI using Google Apps Script

I'm attempting to merge two PDF files from Google Drive via ConvertAPI with the following code. Both pdf1 and pdf2 are file objects. function mergePDFs(pdf1,pdf2){ const formData = "" formData['Files[0]'] = pdf1.getBlob(); …
2
votes
1 answer

How to detect/trap error codes from convertapi so that my python app doesn't fail?

First, my apologies as a Python newbie that I'm asking this question. It probably has nothing at all to do with convertapi and more to do with my basic lack of understanding as to how to interact with APIs. I'm reading a Google sheet to find…
Chip
  • 21
  • 1
  • 2
2
votes
2 answers

convertAPI version 2 docx to PDF

I successfully made a connection to version 1 using the below code:
user1431633
  • 658
  • 2
  • 15
  • 34
2
votes
0 answers

CSS not rendering while converting webpage to pdf using convertApi.dll

I have a large pdf with 50-60 pages. I converted the pdf into web page using ConvertApi web2pdf online api and then added some input controls on the pages wherever required. When user filled all the required input and submit I rendered the entire…
Rajeev.Ranjan
  • 273
  • 1
  • 3
  • 14
1
vote
0 answers

Error in index.js, where converApi.auth is not defined.?

While running the below code let convertApi = ConvertApi.auth({secret: ''}) let elResult = document.getElementById('result') let elResultLink = document.getElementById('resultLink') elResult.style.display = 'none' in index.js it is…
Aravinda KS
  • 187
  • 1
  • 16
1
vote
0 answers

What's the best way to convert a .doc or .docx document to .odt using Python?

I've tried the following. It involves the use of the convertapi library. import convertapi import os …
Victor Simon
  • 75
  • 3
  • 10
1
vote
3 answers

Read JSON from JavasScript - Cannot read property '0' of undefined

I have a JSON response similar to this from ConvertAPI : { "ConversionCost":10, "Files":[ { "FileName":"somefile_XXX.pdf", "FileExt":"pdf", "FileSize":63911, "FileId":"718cc1XXXXXXXXX5", …
Stig Kølbæk
  • 432
  • 2
  • 18
1
vote
2 answers

Json not being parsed ConvertAPI

I'm using classic asp & JSON to convert html to pdf. I send the request using the following: ''Convert output to pdf varURL = "https://" & varServerLive & "/import/" & fileName postURL =…
Benzine
  • 472
  • 1
  • 5
  • 19
1
vote
0 answers

Django fetching file from an URL and save it to a model FileField with S3

I need to fetch a file from an API and then save it in an Survey object. It seems to be working fine, i.e. I can fetch the file and save it where I need to, but a ConnectionAbortedError is raised and the file is uploaded twice. The one saved in the…
1
vote
1 answer

Merging PDFs in python using convertapi

I'm trying to use the module convertapi to merge PDFs in Python3.8. I've tried multiple ways but I'm unable to figure out the origin of the returned error. Here is my function: def merger(output_path, input_paths): dictFiles = {} for i,path…
1
vote
1 answer

Response 5002: PDF damaged

When I try to use ConvertAPIs PDF to txt with Node.js i get the Response 5002: PDF Damaged. Here is my code: let convertapi = require('convertapi')('secret'); return convertapi.convert('txt', { File: pdfFilePath, }, 'pdf') I return the…
1
vote
0 answers

Cannot read pdf file from convertApi response

I was trying to use convertApi (https://www.convertapi.com/pdf-to-compress) in Flutter to compress a pdf. I managed to send a request, get a 200 response code, and extract the 'FileData' from the Json response. However, when I convert the string…
istarii
  • 11
  • 2
1
2 3 4 5 6