[scribus] [Python] How to get the master page name ?

Stephane Santon m.scribus at santonum.eu
Wed Apr 16 17:12:25 UTC 2014


Hello,

I would like to create new pages on an existing document, but as it is 
built with MasterPages named "Normal_gauche" and "Normal_droite", I need 
to pass the master page name as argument to NewPage( ...).

How can I retrieve the master page names from the current docuement ?

I can't use getPageType() neither getMasterPage() ...

         liPage = currentPage()

         liType = getPageType()
         lsType = str( liType)
         self.pageTypeEntry.configure( text=lsType)

         try:
             lsMaster = getMasterPage()
         except:
             self.tkLog( "  Fail getMasterPage()")
             lsMaster = "Fail"

         if (liType == 0):
             self.evenMasterPageEntry.insert( END, lsMaster)
         if (liType == 2):
             self.oddMasterPageEntry.insert( END, lsMaster)


Thanks

-- 
Stephane Santon
Saintes, La Rochelle, Bordeaux, Cognac - France



More information about the scribus mailing list