Setting Custom Page Size in Google Docs - My First Published Google Apps Script Add-On
While Google Docs is a great productivity tool, it still lacks some very simple and common functionality, for example setting a custom page size. Google Slides and Google Drawings allows setting custom sizes, but not Google Docs . Luckily there are several add-ons available for this purpose, for example Page Sizer is a little open source add-on on the Chrome Web Store . Unfortunately in many enterprise setups of G Suite access to the Chrome Web Store and to Google Drive add-ons is disabled for security reasons: the admins cannot white-list single add-ons and are afraid of add-ons that leak company data. Admins can only white list add-ons from the G Suite Marketplace . The Google Apps Script code to change the page size is actually really simple, for example to set the page size to A1 you need only this single line of code: DocumentApp. getActiveDocument(). getBody(). setAttributes({ "PAGE_WIDTH": 1684, "PAGE_HEIGHT": 2384 }); To solv...