Skip to main content
Participant
June 20, 2008
Question

Apply Master Pages through API

  • June 20, 2008
  • 4 replies
  • 432 views
I'd like some pointers on applying master pages through the FrameMaker API. Basically, the same functionality available in the "Apply Master Pages..." menu item.

I'm using the FDK under FrameMaker 8.0 for Windows. The client that I'm working on creates a document by importing a given list of source documents. Once the document is created, I'd like to automatically set the proper Right/Left master page usage.

I've tried setting the FP_PageBackground to FV_BGD_DEFAULT for each page. This almost works - my Right pages have the Right Page header and footer text, but my text frames are still Left page style.
    This topic has been closed for replies.

    4 replies

    Participant
    June 23, 2008
    Russ,

    F_ApiSimpleImportFormats() seems to do the trick! Thanks a million. I never would have though of importing fromats
    i from
    the current document.

    Jesse
    Legend
    June 20, 2008
    Jesse,

    I remember having trouble with this before, but it's been a while. The thing that comes to mind is to do an F_ApiSimpleImportFormats() after you apply the pages, being sure to import page formats and removing overrides. Just use the formats in the document you are working on, something like:

    F_ApiSimpleImportFormats(docId, docId, FF_UFF_PAGE | FF_UFF_REFPAGE | FF_UFF_REMOVE_EXCEPTIONS | FF_UFF_XREF);

    I don't know for sure if that will work. Just an idea.

    Russ
    Participant
    June 20, 2008
    Arnis,

    Thank you for the referral.
    Arnis Gubins
    Inspiring
    June 20, 2008
    Jesse,

    If you don't get any responses to this rather technical question, you
    might want to try the FrameFDK developers group on Yahoo at
    http://groups.yahoo.com/group/frame_dev