Select one or more image frames. Run the script, which asks for your alignment choice (all frames will need to have the same alignment). Choose the position in the dialog radio button grid, click Align, then Done.

+

Select one or more image frames. Run the script, which asks for your alignment choice (all frames will need to

+

have the same alignment). Choose the position in the dialog radio button grid, click Align, then Done.

Note

Note

Revision as of 06:35, 26 January 2014

Under Scribus' "Windows" menu, there is a very nice option called "Align and Distribute". This lets you align items on the page, for example centering them horizontally or vertically, aligning them to the left margin, etc. However, I have not found any way to align an image in its frame.

This script will give you a dialog window, allowing you to select on of 9 alignments:

Top Left, Top Center, Top Right

Middle Left, Middle Center, Middle Right

Bottom Left, Bottom Center, Bottom Right

When you press the "Align" button, it will align all the selected images in their frames, using the alignment option you selected. It has been tested in Scribus 1.3.3.9 and 1.3.4. It requires Tkinter to be properly installed.

Of course, if you need more fine-tuned adjustments than these 9 options, you should probably use the Image Properties toolbar to manually set the X and Y offsets of the image in its frame.

Warning: You can leave the script dialog open, and continue to process more images. However, due to a multi-threading bug with Python scripts in Scribus, if you attempt to launch another script while this one is running, Scribus will probably crash and you'll lose your document. So be careful, and save often!

New Version Fixed for 1.4.3/1.5.0

Aside from fixing it so that it works, I have also changed the import syntax to the preferred import scribus rather than from scribus import *.

Something to note is that when you click the Align button, the work is done, but you don't see the results until you click Done – this is because the document isn't redrawn until then.