Resize Page

Previous topic - Next topic

chackem

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: https://impagina.org/scribus-scripter-api/


Thank you for your help.
Brady

PatJr

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"
 

chackem

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.


a.l.e

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...

digirew

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.


a.l.e

it's in https://impagina.org/scribus-scripter-api/page/ so it should also be in 1.6.0 ...

have you tested it?

digirew

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?


a.l.e

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...

a.l.e