Skip to main content
Inspiring
May 17, 2023
Answered

Framemaker ESTK - Apply master page "None"

  • May 17, 2023
  • 2 replies
  • 860 views

I want the second page of my document to be blank - no headers or footers. If I manually go to Format>Page Layout>Master Page Usage>Custom - There is an option called None which achieve this.

 

I have the following script:

function ApplyMasterPages(doc)
{
var bodyPage = doc.FirstBodyPageInDoc;
bodyPage.ApplyPageLayout(doc.GetNamedMasterPage('Cover Page'));
bodyPage = bodyPage.PageNext;
bodyPage.ApplyPageLayout(doc.GetNamedMasterPage('None'));
}

It doesn't give me an error, but it doesn't remove the headers and foolters either.

I realize I could create a new Master Page without headers or footers and name it "Empty" and apply that it would probably work, but that seems redundant when the built-in option "None" should work.

 

Thanks for the assistance!

    This topic has been closed for replies.
    Correct answer frameexpert

    Use this to apply None:

    bodyPage.PageBackground = Constants.FV_BGD_NONE;

    2 replies

    frameexpert
    Community Expert
    frameexpertCommunity ExpertCorrect answer
    Community Expert
    May 18, 2023

    Use this to apply None:

    bodyPage.PageBackground = Constants.FV_BGD_NONE;

    Inspiring
    May 18, 2023

    Rick - worked like a charm. Thank you!!!

    Bob_Niland
    Community Expert
    Community Expert
    May 17, 2023

    Possibly not useful, but one of my projects has an MP named "Blank", which is only usually blank.

    The header & footer frames are there, but have content controlled by Color Views or Condition codes. All is invisible for print. All but nav hyperlink is invisible for PDF.

    Inspiring
    May 17, 2023

    Bob - Thank you - that's bascially what I meant by creating a master page named "Empty".  I've done that and it works as a workaround, but I'd rather not have an extra master page in the document since the built-in "None" master page should work if I could figure out how to apply it.

    Bob_Niland
    Community Expert
    Community Expert
    May 17, 2023

    re: …I'd rather not have an extra master page in the document since the built-in "None" master page should work if I could figure out how to apply it.

    That sentence might well be defining the problem. I've never used the None feature in the apply-MP dialogs, but what what it appears to be doing is removing any MP assignment, rather than assigning some empty internal MP named "None".

     

    I also have no bets on what happens as pages are inserted or deleted prior to that in the doc, or if an AMP is run.