Warning: Constant MULTISITE already defined in /home/pbmalartu/public_html/wp-config.php on line 107

Warning: Constant SUBDOMAIN_INSTALL already defined in /home/pbmalartu/public_html/wp-config.php on line 108

Warning: Constant DOMAIN_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 109

Warning: Constant PATH_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 110

Warning: Constant SITE_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 111

Warning: Constant BLOG_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 112

Warning: The magic method Pressbooks\Book::__wakeup() must have public visibility in /home/pbmalartu/public_html/wp-content/plugins/pressbooks/inc/class-book.php on line 62
Changing Page Margins in PDF Exports – Pressbooks User Guide ="http://www.w3.org/2000/svg" viewBox="0 0 512 512">

Special Formatting

Changing Page Margins in PDF Exports

You might want the page margins in your book to be smaller, or larger. You can adjust this using the Custom CSS feature. (Please read this first!).

Changing Margins (Left & Right Pages are the Same)

In your Custom CSS, PDF version, add the following to define your page margins. For instance, if you want to make your top and bottom margins 2in, and your side margins 1.5in, you would add the following code:


@page {
  margin-top: 2in !important;
  margin-bottom: 2in !important;
  margin-left: 1.5in !important;
  margin-right: 1.5in !important; 
}

NOTE: the !important is … important. It makes sure your settings override what Pressbooks sets as page size.

Changing Margins (Left & Right Pages are Different)

You may want your left and right pages (recto/verso) to have different margins, so that for instance the outside margins are wide, and the inside margins are tighter. In this case you would add the following:


@page:left {
  margin-top: 2in !important;
  margin-bottom: 2in !important;
  margin-left: 3.5in !important;
  margin-right: 1.5in !important; 
}

@page:right {
  margin-top: 2in !important;
  margin-bottom: 2in !important;
  margin-left: 1.5in !important;
  margin-right: 3.5in !important; 
}

NOTE: We have recently introduced a new method for setting custom margins in select themes. For more, see our guide chapter on the changes.

License

Icon for the Creative Commons Attribution 4.0 International License

Changing Page Margins in PDF Exports by admin is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book

css.php