In this tutorial, we will show you how to merge all rows to PDF and save them back to Google Drive with PDF.co using Google Apps Script
- Open the Spreadsheet
- Extensions Menu and Apps Script
- Apps Script Editor
- Setup Code
- Run Apps Script
- Finish Apps Script
- Script Result
The following image shows the Google Drive folder with the spreadsheet and the output file.
Step 1: Open the Spreadsheet
- To begin. First, open the Spreadsheet from your Google Drive folder.
Step 2: Extensions Menu and Apps Script
- Next, click on the Extensions menu and select the Apps Script.
Step 3: Apps Script Editor
- Then, enter the sample code. You can get the source code at this link.
Step 4: Setup Code
- In line 6, enter your PDF.co API Key. You can obtain your PDF.co API key by signing up at PDF.co at this link.
- In line 9, type in your desired output file name.
- For lines 12 and 13, add the number of your starting row and column.
- For lines 14 and 15, enter the value of all rows and columns containing your files to merge.
Step 5: Run Apps Script
- After setting up the code, you may now run the Apps Script.
Step 6: Finish Apps Script
- Click on the PDF.co menu and press Merge All Rows to run the script.
Step 7: Script Result
- Once the script is finished, check your Google Drive folder to see the result.
In this tutorial, you learned how to merge all rows to PDF and save them back to Google Drive with PDF.co using Google Apps Script.