Scribus Forums

Scribus => Beginner Talk => Topic started by: paolobb4 on April 23, 2019, 05:55:36 PM

Title: Scriptus without gui for pdf generation
Post by: paolobb4 on April 23, 2019, 05:55:36 PM
Hello people :)
I'm developing a web application where some pdf generation is required admin side. I've got a script for scribus working but the thing is that having a graphical interface is quite heavy, so I'm basicaly asking if it is possible to run Scribus without gui and without having to install X.
I know there's the -ng option but I still see the gui pop up when rendering the pdf, and even so that doesn't remove the dependency for an x server to be runing (I really hope I'm wrong here).

Is there any known solution for this issue?
Are there any libraries or small cli applications for compiling pdf from sla?
Where can I take a look at the source code for scribus pdf generation? (I think scribus is closed source so I guess I won't get any answer on this one)

I thank you in advance for any answers  :-*
Title: Re: Scriptus without gui for pdf generation
Post by: a.l.e on April 24, 2019, 08:22:30 AM
scribus is developed on a secret svn server where only the team has access...

luckily, somebody has sneaked in a sync script that mirrors everything they do to this server:

svn co svn://scribus.net/trunk/Scribus scribus

i was annoyed that everything was hidden behind that svn encryption and made a solution that converts everything into the open source world:

git clone https://github.com/scribusproject/scribus.git
and
https://gitlab.com/scribus/scribus

the secrets you are looking for are hidden in here:

https://gitlab.com/scribus/scribus/blob/master/scribus/pdflib.h

irony off/>

of course, scribus is open source...
but getting scribus to run without an x server will be hard. but it's not an impossible task.

most poeple have found it easier to run scribus under Xvfb.
but i would welcome every effort done to get scribus to run without any GUI. theoretically i really think that it should be possible! and i would probably even improve the GUI code and remove lot of bugs!

finally, creating an application that produces a PDF from SLAs is probably not triivial but not that hard either: you will have to fake (and reimplement) all the calls to the outside world, so that they do not depend on a GUI (and, possibly, find a way to get the changes back into the main code, so that you don't have to maintain it).
if i get paid for that, i would not mind doing it...

there are other possible solution to make your conversion workflow faster and i would not mind to do some consulting for it : - )

ciao
a.l.e
Title: Re: Scriptus without gui for pdf generation
Post by: paolobb4 on April 29, 2019, 10:35:41 AM
Thanks   :D I couldn't find any reference to a repo on the main page. Probably my fault, I tend to filter 90% of the thing i see when looking for something and sometimg I filter out the thing itself. I need to upgade my search algorithm   ;)

I'll give it a try with Xvfb.

Thanks for the quick response.
Title: Re: Scriptus without gui for pdf generation
Post by: a.l.e on April 29, 2019, 04:36:53 PM
well, i don't really like the scribus.net site, but the header says "Scribus, open source desktop publishing"... : - )

goodluck with Xvfb and please write in here, how well it went for you...
Title: Re: Scriptus without gui for pdf generation
Post by: rumple on June 21, 2019, 08:13:25 PM
Use a PHP pdf generator like MPDF