Resize Page

Previous topic - Next topic


My ultimate goal is to create a pdf that is the exact size of text I have converted to outlines through scribus python scripting.

I've run in several problems.

1) I can't figure out how to change the size of the current document, master pages or pages at all.

2) If I use traceText, the resulting outlines are grouped with a name that can't be used in the script because it wasn't directly set.

3) If I use the python script to select an item THEN export as an eps, the eps will only contain the selected item which would work, but because of #2 I have to select all objects on the page. But then I can't figure out how to set the name for the object so I can refer to it in the rest of the script.

Any advice? Are these limits to the python scripting or is the documentation just not very user friendly? The documentation I'm using is:

Thank you for your help.


changing the page size
File>Document Setup
change the page size and margins and bleeds
be sure to check the "Apply changes to all pages" and "Apply changes to all master pages"


I need to be able to do this through the python script, which I run through the command line without using the gui using xvfb-run.


hi brady,

i'm working on creating a patch for adding python function that can manipulate the page size.

i plan to add:

- getPageSizeList() # all active page names
- setPageNSize(pageSizeName)
- setPageNWidth(width)
- setPageNHeight(height)
- setPageSize(pageSizeName)
- setPageWidth(with)
- setPageHeight(height)

I hope that (i can get it done soon and that) it can be added to 1.5.9...


Hi A.l.E,

Just curious if this ever made it into a release?

Really looking forward to modifying the page width and height via. scripts.


it's in so it should also be in 1.6.0 ...

have you tested it?


I only use that website you mention for scripting scribus.

Im using 1.6.1 and I get the below error when I try to set scribus.setPageHeight(objheight)

AttributeError: module 'Scribus' has no attribute 'setPageHeight'.

It makes me believe that it does not exist in 1.6.1?


eh eh, that information would have helped me focus on the right path for replying to your previous question.

and: there is no patch yet for it.
i will check what is still missing...