I am trying to merge different file sources into one Google doc, in a programmatic way. That means I should use Google scripting. So far I do not have problems inserting text files, images, MS Word or OpenOffice documents into one doc in Google drive. The problem arises when I want to join a PDF file. If I use Google Drive API for this task, the PDF file is converted into text and loses all the format or other elements that could be in the original file, producing an undesirable output. The goal would be to convert the PDF file into a series of pictures, one for every page. The problem is that as far as I know Google can't do this alone. I could use an external app for this purpose, like CloudConvert, but I do not know if it could integrate in my scripts to do the task automatically, so the questions are:

  • Can anyone know if I could use an external app like CloudConvert or any other in my scripts in Google Docs?
  • Or, Can anyone suggest another approach to solve the problem of merging a PDF in a Google doc automatically?

P.S. Everything has to be in Google because this is part of a series of procedures for a Google for Education site, involving Spreadsheets, Forms, and other type of documents, all of them in our site.

2 Answers 2


It the external app has an API it could are expose the converted result through and URL it's very likely that will be possible to integrate that service with Google Apps Script by using the URL Fetch Service. For further details see https://developers.google.com/apps-script/guides/services/external


I found that Cloudconvert offers a REST API that seems to solve the problem I face. The first intents to get it to work are hard because the documentation is very scarce in examples. I hope to manage link Google scripts and the API, and when I get it I'll post my code in case others could benefit from it. Regards Rafael

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.