<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Juraj has written patches to add an applyMasterPage command to scripter.</div><div><br></div><div>After applying the patch, you can assign master pages by modifying his example script below.</div><div><br></div><div>Scribus 1.4 patches are at <a href="http://bugs.scribus.net/view.php?id=12757" target="_blank" style="font-size: 12pt;">http://bugs.scribus.net/view.php?id=12757</a></div><div><br></div><div>Scribus 1.5 patches are at <a href="http://bugs.scribus.net/view.php?id=12758" target="_blank" style="font-size: 12pt;">http://bugs.scribus.net/view.php?id=12758</a></div><div><br></div><div><br></div><div><br></div><div><div>import scribus</div><div><br></div><div>scribus.newDocument(scribus.PAPER_A4, (15,15, 20, 20), scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.PAGE_2, 1, 8)</div><div><br></div><div>def create_mp(name):</div><div> scribus.createMasterPage(name)</div><div> scribus.editMasterPage(name)</div><div> txt=scribus.createText(250, 70, 120, 30)</div><div> scribus.setText(name, txt)</div><div> scribus.closeMasterPage()</div><div> return name</div><div><br></div><div>odd = create_mp('Odd Master Page')</div><div>even = create_mp('Even Master Page')</div><div><br></div><div>for p in range(8):</div><div> page = p+1</div><div> name = odd</div><div> if page%2 == 0:</div><div> name = even</div><div> print (name, page)</div><div> scribus.applyMasterPage(name, page)</div><div><br></div><div>scribus.saveDocAs('masterpage.sla')</div><div><br></div><div>pdf = scribus.PDFfile()</div><div>pdf.save()</div><div><br></div><div>#scribus.applyMasterPage('Wrong Name', 1)</div><div>#scribus.applyMasterPage(even, 42)</div></div><div><br></div> </div></body>
</html>