
Custom Page Sizer for Google Docs
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 Chat™ is a trademark of Google LLC
-
NatadTech™ is a trademark of NatadTech Solutions OPC
Explore and install this tool directly from the Google Workspace Marketplace for a seamless experience.
- Set custom page size and margins
- Adds a custom menu:
Page Sizer by Adam Natad
- Displays an animated success popup after applying changes
- Guide dialog for first-time users
All scripts are located inside the AppScript
folder:
- 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 contents fromAppScript/PageSizeDialog.html
- Create an HTML file named
SuccessDialog.html
and paste contents fromAppScript/SuccessDialog.html
- Create an HTML file named
GuideDialog.html
and paste 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 - Replace its contents with the JSON from
AppScript/appsscript.json
- Create a Script file named
- Save the project.
- Authorize the App:
- When you run the script for the first time (by selecting the custom menu), you will be prompted to grant authorization.
- The app requires two OAuth scopes:
https://www.googleapis.com/auth/documents.currentonly
This scope allows the app to modify only the currently open Google Doc, which is used for applying custom page sizes and margins.https://www.googleapis.com/auth/script.container.ui
This scope enables the app to create and manage UI elements within Google Docs, such as the custom menu and dialogs.
- Follow the on-screen prompts and click Allow to grant these permissions.
- Reload your Google Doc.
- A new menu called
Page Sizer by Adam Natad
will appear in your document. - Select Start from the menu to launch the page sizing tool.
- Enter your custom dimensions and margins, then click Apply.
Below are screenshots demonstrating various aspects of the tool. Each image is stored in the Previews
folder.

The custom menu "Page Sizer by Adam Natad" appears at the top of your Google Doc.

The main view of the page size dialog, where you can enter your custom dimensions and margins.

An option to select a preset configuration for quick page setup.

The bottom section of the page size dialog displaying the Apply Page Settings button.

An animated popup confirms your changes after applying the new page size.

A guide dialog provides guidance for first-time users on how to use the tool.
Made with love by Adam Natad
🌐 natadtech.com
📧 [email protected]
This project is licensed under the MIT License. See the LICENSE file for details.