[scribus] How to set baseline grid in Python script?

O'Brien-Strain, Eamonn eamonn.obrien-strain at hp.com
Fri Jun 26 18:31:24 CEST 2009

> -----Original Message-----
> From: John Beardmore [mailto:John at T4sLtd.co.uk] 
> [...]
> Gregory Pittman wrote:
> > No, Eamonn, there is no python command for this. Not sure it's 
> > necessary, since there is only one baseline grid setting 
> for an entire 
> > document. You can set it in File > Preferences > Guides for future 
> > documents, or File > Document Setup > Guides for the 
> current document.
> I guess it means that it's hard to write code to set up new 
> documents from scratch though ?
> Perhaps not a huge loss, but I'd have thought that exposing 
> this stuff to python would be useful from time to time ?

Thanks Greg and John for the replies.

Yes indeed I am writing Python code that automatically creates new documents from scratch, adds content, and saves PDF -- all with no human intervention.  So the ability to set the baseline grid would indeed be useful.

Right now, because I cannot use Scribus to align to a baseline grid I use my code to carefully control text box positions and properties such as lineSpacing.  Hopefully, that gives me the same effect as aligning to the baseline grid, but it adds quite a lot of complexity and fragility to my code.

So I vote for exposing the baseline-grid-setting functionality in Python.

More information about the scribus mailing list