0

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.

migrated from superuser.com Jan 8 at 22:29

This question came from our site for computer enthusiasts and power users.

0

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

-1

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

New contributor
Rafael is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.