How to show the file name on a document?

Previous topic - Next topic


My problem: I start a Scribus document that I call «Mybook_V0». After corrections, it will be called "Mybook_V1", "Mybook_V2", etc. in successive versions.
I would like this name to appear automatically in a text frame on a page. Is it possible, and if so, how?
Thank you for your explanations.


no, i don't think it's possible, sorry.

as far as i can tell, this is a feature that is typical for word processing, but not so frequent when doing layouts.

(probably because, if you're putting so much effort in the way your document looks, you don't want to "leak" the details about the name of your document...)

(also, with layouts, you will probably version the whole folder, not the .sla file... and if you're doing it correctly, you will use a revision system, not renaming files... and if one is renaming files, i fear that the typical file will be called "My Work - proofed (Final)_For print (Colors fixed).sla"... and you don't want to see that in a printed file : - )


Good morning,
Thank you for your answer, I am afraid it is not possible.
In fact, what I would like is for the name of the file to appear on the printed version (discreetly), so that the various stakeholders are sure to have the same version.
I was thinking of a macro introducing this name, in the same way as inserting a special character (page number or special character).


yes, it's easy to do that with a python script that you run inside of scribus:

scribus.setText(scribus.getDocName(), 'Text1')
- this adds the document name with its path to the the text frame named 'Text1'
- if you only want the name without the path, you can use the python's pathlib library
- if the the text frame is on a master page, you will first need to activate that master page (scribus.editMasterPage())


Oh, great !
But I am not fluent in python.
What I have to do ?
Can you explain me from beginning ?


1. learn python (depending on your existing programming skills, this could be rather easy or take some time...)

   there are tons of online tutorials for it.

2. understand what the scribus' scripter api allows to use (the "export all text" script is probably a good start)

3. find a script that does something similar to what you need and adapt it.

(ah, and i forgot to repeat it: read the the scribus help, the section "for developers")