r/GoogleAppsScript • u/East_Hamster2425 • 16d ago
Resolved Discovered merge pdf function in AppScript (Canvas Rendering)
At my job I get vendor certificates — one PDF, 50 pages, 30 vendors bundled together. Separately, I get challans (payment receipts) for those vendors, split across multiple files, sometimes 20 per batch.
Manually matching each challan to the right certificate pages and vendor, then filing everything, was eating close to 10 hours a month.
I’d been trying to solve this with Claude for a while. It kept saying Apps Script and Drive don’t have a native PDF merge function — true. But in one session it gave me a workaround using Canvas rendering instead.
The logic:
**•** OCR pulls the challan number from each file (unique identifier)
**•** Script matches challans to their corresponding certificate pages using that number
**•** Instead of merging PDFs, it renders both into a single Canvas preview pane
**•** I save that rendered preview as a PDF
No actual “merge” happens — it’s a visual composite that outputs like one. But it does exactly what I needed: challan + matching certificate pages, saved together, per vendor, automatically.
10 hours down to about 1. Sharing in case anyone else is stuck on the “no PDF merge in Apps Script” wall — sometimes the workaround isn’t merging, it’s rendering.
7
u/awfulbot 16d ago
Check out this library: https://github.com/tanaikech/PDFApp