Apply Masters based on Paragraph Styles

Apply Master Pages based on Paragraph Styles

Important announcement: This script is no longer being developed. The newest version of this script is called MASTERMATIC and contains many more features than the old Apply Masters script featured on this page. Click here to be taken to the new, full-featured MASTERMATIC page.

The best-selling “Apply Master to Pages” is an InDesign script (for versions CS4 upwards) that allows the user to apply master pages to an entire document based on the paragraph styles that appear on each page.

Screenshot of "Apply Masters to Pages" script

The user can select up to 10 paragraph styles per document that are associated with a master page.

The user can also assign a master page to be applied to blank pages (blank pages are defined as pages that contain no text).

Finally, the user can assign a default master page to all other pages.

New in version 1.5.0: It is now possible to ignore preliminary pages. This was a much needed feature, since prelims often are not easily categorized in terms of paragraph style–master page pairs.

All these settings are remembered on a per-document basis, and are saved alongside the document.

A demo version can be downloaded here. It runs just like the full script with the limitation that it only works three times per document.

A single license for this script is available at $39.00 USD. For multiple licenses, please contact us to arrange a discount.

The terms of the license permit the installation of the script on a single user’s computer. The script is copyright. It is illegal to make unauthorised copies of the script.

For just $39.00, this script is an amazing timesaver for anyone working on long documents in InDesign.

Important announcement: This script is no longer being developed. The newest version of this script is called MASTERMATIC and contains many more features than the old Apply Masters script featured on this page. Click here to be taken to the new, full-featured MASTERMATIC page.

You may still purchase the old “Apply Masters” script by clicking on the Buy Now button below.

21 thoughts on “Apply Masters based on Paragraph Styles

  1. Hi, Ariel:

    I tried the Mac CS5 demo of ApplyMasterToPage and found that its dialog box only offers one choice of master page/paragraph style pair per run. The screenshot on the product info page shows a bunch of master/paragraph options, which implies that multiple master pages can be applied in a single run. Is this demo working correctly?



    Peter Gold
    KnowHow ProServices

  2. Hi Peter,
    Thanks for trying it out and posting your feedback.
    The script was written and tested on InDesign CS4, and I suspect that that is the issue.
    I have replaced the demo version on the link with a new version that should work on CS5 without it needing to be placed in a special script-versioning folder.
    If you have a chance to check it out and post back here that would be much appreciated.


  3. Thanks for doing the work on this. Our house style starts chapters on recto pages; will this script automatically create a blank verso facing page?

  4. Hi KidPubPress,

    No, this script does not create any pages. But, in InDesign, you can set your chapter opening style to always begin on a right-hand page, and InDesign itself will then create a blank verso page.

    What the script does do is it lets you specify a master page style for any blank pages (see the screenshot above; this option is in the second from last checkbox at the bottom). A blank page is defined as one on which there are no live text frames, or on which all of the live textframes contain no text.


  5. Is there a tutorial on this? Where can i get it?


  6. […] if you could apply a master page based on a paragraph style? Here’s a free script that helps you with this. (If you need more control than the script offers, I suggest looking at […]

  7. Hi David,

    There isn’t a tutorial as such, but if you have any questions feel free to post them here and I’ll do my best to answer.


  8. Hi Ariel!
    I found your page by “googling around” for a specific script.
    Yours is nearest so far to my requirement:

    • Merged InDesign file with a field for special keywords (red, green…)
    • Apply Master Page by this keyword
    (p.ex. Keyword “red” = Master page “red”)

    Is this possible? (CS5.5)

    Best regards

  9. Hi Stefan,

    I’ve emailed you privately with a detailed answer, but in principle, I’m always happy to alter a script to suit a person’s individual needs.

    (PS I took the liberty of correcting my name in your comment!)

  10. This script has saved me hours of work. I produce documents that are over 200 pages long. Each page that begins a new chapter needs a specific master applied. With this script, I don’t have to worry about page reflows causing the wrong master to appear on a page that begins a new chapter—I just run the script as a last step before outputting the file, and I know my masters will be correct.

  11. Hi Frances,

    Thanks for posting your feedback!

    Best wishes,

  12. Hi Ariel,

    I need to start each new chapter on a new page. The master will vary though, depending on whether it’s a recto or verso page. Will this script allow me to do this automatically (i.e. look at the paragraph style, and if it’s a new chapter style, then start on a new page with either the recto/ verso master as appropriate)?

    Open to options is there’s an easier way… the only reason I’m using 2 masters for the recto/verso chapter starts is because the left/right margins would be different – all else is the same.


  13. Hi Pratish,

    I don’t think there should be a problem: Your master page should be set up as 2-page spread. Set the margins for each side (recto and verso) as needed. Then simply apply the master to your page, and InDesign will take care of the rest: if the page is a left-hand page, the left-hand page of the master will be applied, and if right-hand, right-hand.

    For the same reason, the Apply Masters script should work fine.


  14. Thanks for the reply Ariel – please confirm the script works on Indesign CS5.5 and you’ve just made yourself a sale 🙂

  15. Hi Pratish,

    It’s been tested on CS4, CS6 and CC, so there’s no reason it shouldn’t work on CS5.5 as well!

    However, there’s a demo version available ( and I would recommend trying that out on your system to be 100% sure.


  16. Hi Ariel,
    I’ve been using your script for book design for a while with decent results. However, one thing that almost always occurs is that eventually in the document, my chapter opener page will be one page off from where it should be. This throws the rest of the document off by a page as well. I end up having to run the script several times to get it to apply my CO master page to all the pages that contain my cn (or ct) paragraph style. . .

    Could I be doing something wrong?

  17. Hi Chris,

    Sorry for the delay in replying. It’s been the holiday season here.

    Glad you’re putting the script to good use! You’re not doing anything wrong: the script does not work in the background, and does not update your document automatically. So if pages reflow, etc., you must indeed rerun the script (if you assign a keyboard shortcut to the script, this is a matter of seconds).


  18. Hi Ariel,
    Thanks for the response, I’m not certain that I was clear though.

    I mean, that when I run the script the first time it only seems to work up until a certain point in the document. After x number of chapters, the CO page that I set is one page off. Meaning that I have to rerun the script several times when I’ve made no changes to the document.

    If you’d like, I can send you a sample document to have a look at.


  19. Hi Chris,

    Thanks. I’ve looked at the files (Chris PMed with some files –ed.) and I can see what’s going on, I think. It doesn’t have anything to do with what I was describing.

    What’s happening is that because you’re using a master frame that is different for chapter openings and regular pages (in order that your chapter title will start on the 7th baseline), when chapter opening masters are applied, the entire layout changes.

    But the way the script works, it takes a snapshot of the document at the time you run it, figures out which pages require different masters, and then applies them all in one go. That is, it does not apply them one at a time, check to see if anything’s changed because of that master being applied, and then recalculate, which would be very much slower.

    (I helped Chris out with a custom version of this script that loops until there are no further changes. Anybody who encounters a similar problem, feel free to contact me, but in general, I would recommend using the main script featured on this page. –Ed.)

  20. Hi [Ariel]

    Working on a book of about 200 pages with multiple chapters. each chapter must start on a right hand page, which I know how to do. The client also wants the title of the page on the right hand page by itself, but the opening paragraph of the chapter to appear on the next right hand page (still good with this) but starting about 2in down from the top margin. I also need to have the chapter title appear lower on its page as well. Can your script do this?

  21. So figured out moving my titles down with another trick but tried your demo to apply master pages and it works great so am purchasing a licensed version. thanks for a cool script.

Leave a Reply

Your email address will not be published. Required fields are marked *