How to merge Google documents with PDF files automatically?












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.










share|improve this question
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from superuser.com Jan 8 at 22:29


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























    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.










    share|improve this question
















    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






    migrated from superuser.com Jan 8 at 22:29


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





















      0












      0








      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.










      share|improve this question
















      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.







      google-apps-script google-docs pdf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 9 at 0:38









      Rubén

      27.7k637171




      27.7k637171










      asked Jan 8 at 20:33







      Rafael












      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






      migrated from superuser.com Jan 8 at 22:29


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









      migrated from superuser.com Jan 8 at 22:29


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
























          2 Answers
          2






          active

          oldest

          votes


















          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






          share|improve this answer































            -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






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "34"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              noCode: true, onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f123846%2fhow-to-merge-google-documents-with-pdf-files-automatically%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown
























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              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






              share|improve this answer




























                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






                share|improve this answer


























                  0












                  0








                  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






                  share|improve this answer













                  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







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 9 at 1:03









                  RubénRubén

                  27.7k637171




                  27.7k637171

























                      -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






                      share|improve this answer




























                        -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






                        share|improve this answer


























                          -1












                          -1








                          -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






                          share|improve this answer













                          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







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 16 at 0:52









                          RafaelRafael

                          1




                          1






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Web Applications Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f123846%2fhow-to-merge-google-documents-with-pdf-files-automatically%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]