Freely set custom page sizes and margins in Google Docs™. Perfect for Amazon KDP Paperback and Hardcover trim sizes. Made for authors who love writing in Google Docs™ like me. — Made with ♥️
A lightweight Apps Script tool that adds a custom menu inside Google Docs, allowing you to set your own page width, height, and margins beyond the default limitations.
Page Sizer by Adam Natad is a simple yet powerful Google Docs™ add-on that allows you to freely set custom page sizes and margins for your documents with ease. Whether you're preparing manuscripts for Amazon KDP Paperback or Hardcover formats, or simply want precise control over your document layout, this tool is built to support your writing needs.
⚙️ Features:
– Set exact page width and height (in inches or centimeters)
– Adjust top, bottom, left, and right margins
– Choose from preset trim sizes or define your own
– Designed with authors and self-publishers in mind
I created this for myself to streamline my publishing process, and I’m sharing it to help other writers and indie authors who love working in Google Docs™ as much as I do. No complicated setup, just install, customize, and write your story your way.
– Google Docs™ is a trademark of Google LLC
– NatadTech™ is a trademark of NatadTech Solutions OPC
✨ Features
- Set custom page size and margins
- Adds a custom menu: Page Sizer by Adam Natad
- Animated success popup after applying changes
- Guide dialog for first-time users
📁 Files Location
All scripts are located inside the AppScript
folder:
Code.gs
PageSizeDialog.html
SuccessDialog.html
GuideDialog.html
appsscript.json
🚀 How to Install and Use
- Open your Google Doc.
- Navigate to Extensions → Apps Script
- Delete any existing code in the script editor.
- Add the following files:
- Create a Script file named
Code.gs
and paste the contents fromAppScript/Code.gs
- Create an HTML file named
PageSizeDialog.html
and paste the contents fromAppScript/PageSizeDialog.html
- Create an HTML file named
SuccessDialog.html
and paste the contents fromAppScript/SuccessDialog.html
- Create an HTML file named
GuideDialog.html
and paste the contents fromAppScript/GuideDialog.html
- Enable viewing of the manifest file:
- Click the ⚙️ gear icon (Project Settings) in the left sidebar
- Check "Show 'appsscript.json' manifest file in editor"
- Open the newly visible
appsscript.json
file and replace its contents with the JSON fromAppScript/appsscript.json
- Create a Script file named
- Save the project.
- Authorize the App:
- When you run the script for the first time, you will be prompted to grant authorization.
- The app requires the following OAuth scopes:
https://www.googleapis.com/auth/documents.currentonly
– Modify the currently open Google Dochttps://www.googleapis.com/auth/script.container.ui
– Manage UI elements like menus and dialogs
- Follow the on-screen prompts and click Allow.
- Reload your Google Doc.
- A new menu called Page Sizer by Adam Natad will appear in your document.
- Select Start from the new menu to launch the page sizing tool.
- Enter your custom dimensions and margins, then click Apply.
📷 Previews
Below are screenshots demonstrating various aspects of the tool.
Preview 1: Custom Menu

The custom menu "Page Sizer by Adam Natad" appears at the top of your Google Docs.
Preview 2: Page Size Dialog - Start Dialog

The main view of the page size dialog, where you can enter your custom dimensions and margins.
Preview 3: Select Preset Menu

An option to select a preset configuration for quick page setup.
Preview 4: Apply Page Settings

The bottom section of the page size dialog displaying the Apply Page Settings button.
Preview 5: Success Popup

An animated popup confirms your changes after applying the new page size.
Preview 6: Guide Dialog

A guide dialog provides guidance for first-time users on how to use the tool.
🎬 Watch It in Action
Quick Video - From App Script
Quick Video - From Add-On Marketplace
Detailed Video - From Add-On Marketplace
Made with ♥️ by Adam Natad