Gists
Abstract This study proposes a workaround to address the Gemini API’s current inability to directly process web content from URLs. By utilizing Google Apps Script, the method extracts relevant information from a specified URL and feeds it into the API for summarization. This approach offers a solution for generating comprehensive summaries from web-based content until the API’s limitations are resolved.
Introduction While Gemini API offers powerful text generation capabilities, it currently faces limitations in directly accessing and processing web content from URLs.
PDFApp was updated to v1.0.7. v1.0.7 (May 15, 2024)
The method of “addPageNumbers” was updated. Ref When a number is used to the property x instead of “left”, “center”, and “right”, the inputted number is directly used. You can see the detail information here https://github.com/tanaikech/PDFApp
PDFApp was updated to v1.0.6. v1.0.6 (May 15, 2024)
A new method of “addPageNumbers” was added. Ref This method adds the page numbers to each page of the PDF. You can see the detail information here https://github.com/tanaikech/PDFApp
Gists
Description This is a simple sample script for adding the page numbers to PDF data using Google Apps Script.
When you use this script, please copy and paste the following script to the script editor of Google Apps Script. And, please set the file ID of the PDF file.
Sample script In this script, pdf-lib is used.
/** * ### Description * Add page numbers to PDF. * * @param {Object} blob PDF blob.
PDFApp was updated to v1.0.5. v1.0.5 (February 5, 2024)
A new method of “splitPDF” was added. Ref This method splits each page of a PDF to an individual PDF file. You can see the detail information here https://github.com/tanaikech/PDFApp
PDFApp was updated to v1.0.4. v1.0.4 (February 5, 2024)
From this discussion, I changed the logic of copyPages. You can see the detail information here https://github.com/tanaikech/PDFApp
PDFApp was updated to v1.0.3. v1.0.3 (November 26, 2023)
From this discussion, I changed the logic of the method mergePDFs. The method for using mergePDFs and the output are not changed. With this modification, the large PDF data can be merged. You can see the detail information here https://github.com/tanaikech/PDFApp
PDFApp was updated to v1.0.2. v1.0.2 (August 21, 2023)
A new method of insertHeaderFooter was added. Ref When this method is used, the custom header and footer can be added when a Google Spreadsheet is exported as PDF. You can see the detail information here https://github.com/tanaikech/PDFApp
Gists
This is a sample script for adding header and footer to PDF using Google Apps Script.
In the current stage, when Google Spreadsheet is manually exported as a PDF file at “Print settings” on the UI of Spreadsheet, the custom header and footer can be added as shown in the following image.
But, unfortunately, in the current stage, this cannot be directly achieved by Google Apps Script. So, I created this sample script.
PDFApp was updated to v1.0.1. v1.0.1 (August 18, 2023)
About the method of “getMetadata”, pageInfo is added to the retrieved metadata. By this, each page size can be obtained. You can see the detail information here https://github.com/tanaikech/PDFApp
Overview This is a Google Apps Script library for managing PDFs.
Description Google Apps Script is one of the most powerful tools for cloud computing. When Google Apps Script is used, the result can be obtained even when the user doesn’t stay in front of the PC and mobile phone by the triggers. One day, there might be a case where it is required to manage PDF data using Google Apps Script.
Gists
Abstract When PDF file can be managed with Google Apps Script, that will lead to the automation process on cloud. In this report, the method for cooking PDF over Google Apps Script.
Introduction Google Apps Script is one of the strong tools for achieving the automation process. When Google Apps Script can be used for the situation, it can be processed with cloud computing. By this, the users are not required to stay on the desks with the PC.
Gists
This is a sample script for embedding the objects in PDF using Google Apps Script.
Recently, I had a situation where it is required to manage PDFs using Google Apps Script. At that time, I had a situation where it is required to embed objects of texts and images in PDF using Google Apps Script. So, I created the following Class with Google Apps Script. When this Class is used, the objects of texts and images can embed in PDF.
Gists This is a sample script for creating PDF forms from a Google Slide template using Google Apps Script. Recently, I had a situation where it is required to create a custom PDF form. In that case, I thought that when a PDF form can be created from a template, it might be useful. So, I created the following Class with Google Apps Script. When this Class is used, a
Gists This is a sample script for retrieving and putting values for PDF Forms using Google Apps Script. PDF can have the PDF Form for inputting the values in the PDF by the user. Ref Recently, I had a situation that required me to retrieve and put the values to the PDF Form using Google Apps Script. In order to achieve this, I created a Class object with Google Apps
Gists
This is a sample script for changing the order of pages in a PDF file using Google Apps Script.
Sample script Before you run this script, please set the variables in the function main.
/** * ### Description * Changing order of pages in a PDF file. * * @param {Object} fileId is file ID of PDF file. newOrderOfpages is new order of pages. About "ignoreSkippedPages", if this is false, when the PDF has 5 pages and "newOrderOfpages" is "[3, 2]", the exported PDF file has 5 pages of 3, 2, 1, 4, 5.
Gists
This is a sample script for managing the metadata of PDF data using Google Apps Script.
There might be a case in that you want to retrieve and update the metadata of PDF data using Google Apps Script. In this post, I would like to introduce achieving this.
Class ManagePdfMetadata This is a Class ManagePdfMetadata. This Class is used for managing the metadata of PDF files using Google Apps Script.
Gists
This is a sample script for exporting the specific pages from a PDF as a new PDF using Google Apps Script.
In this sample script, pdf-lib is used. In the current stage, it seems that this Javascript can be directly used with Google Apps Script.
Sample script async function myFunction() { // Retrieve PDF data. const fileId = "###"; // Please set a file ID of your a PDF file or a file ID of Google Docs files (Document, Spreadsheet, Slide).
Gists
This is a sample script for converting all pages in a PDF file to PNG images using Google Apps Script.
I have already published “Merging Multiple PDF Files as a Single PDF File using Google Apps Script”. In this post, it was found that pdf-lib can be used with Google Apps Script. From this, in this post, I would like to propose a sample script for converting all pages in a PDF file to PNG images using Google Apps Script.
Gists
This is a sample script for merging multiple PDF files as a single PDF file using Google Apps Script.
In this sample script, pdf-lib is used. In the current stage, it seems that this Javascript can be directly used with Google Apps Script.
Sample script 1 As a sample situation, please put multiple PDF files in your Google Drive. This sample merges those PDF files as a single PDF file.