Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Script for identifying blank pages with Master Page applied

Return to Member Forum

  • Author
    Posts
    • #89795
      Robin Buena
      Member

      I’m looking for a script that will identify all the blank pages that has master pages only but skips all blank page with [None] so that I can remove the applied master page immediately leaving them completely blank. The InDesign Preflight profile only has the option for blank pages to consider pages as empty if they contain only master page items but still flag completely blank pages as error. Thanks.

    • #89896
      Peter Kahrel
      Participant

      Not sure what uou mean by

      > so that I can remove the applied master page immediately leaving them completely blank

      Maybe ‘apply [None] to them’? In that case:

      (function () {
        var list = [];
        var pages = app.documents[0].pages.everyItem().getElements();
        for (var i = 0; i < pages.length; i++) {
          if (pages[i].pageItems.length === 0 && pages[i].appliedMaster !== null) {
            list.push (pages[i].name);
            pages[i].appliedMaster = null
          }
        }
        alert ('Blank pages with a master applied: \r\r' + list.join('\r'));
      }());

      The script lists the page numbers as well so you can check.

      Peter

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
Forum Ads