how can I copy a master-page as a new page in the same document?
I have a master page:
var master = doc.masterSpreads.itemByName("B-Parent");
I want that as a new page after my last page. I dont want that new page have that assigned master page "B-Parent", I want that new page be a copy of the master-page, having all items the master page has itself, but not the Items that the master-page inherits from its master-page:
So, if B-Parent has some text-frames and and an image and has itself the A-Parent as master which has some background etc., the new page should end up mastered by A-parent (B-Parents master) and should have a copy of B-Parents text-frames and its image.
How can I do that?
var master = doc.masterSpreads.itemByName("B-Parent"); var newPage = app.activeDocument.pages.add(); /* ... how can I copy the content of master into newPage? ... */ newPage.appliedMaster = master.appliedMaster;
