Scribusoid

Author Topic: Scriptus without gui for pdf generation  (Read 681 times)

paolobb4

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Scriptus without gui for pdf generation
« on: April 23, 2019, 06: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  :-*

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2177
  • Karma: 28
    • the graphics lab
Re: Scriptus without gui for pdf generation
« Reply #1 on: April 24, 2019, 09: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

paolobb4

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Re: Scriptus without gui for pdf generation
« Reply #2 on: April 29, 2019, 11: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.

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2177
  • Karma: 28
    • the graphics lab
Re: Scriptus without gui for pdf generation
« Reply #3 on: April 29, 2019, 05: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...

rumple

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Scribus User
Re: Scriptus without gui for pdf generation
« Reply #4 on: June 21, 2019, 09:13:25 pm »
Use a PHP pdf generator like MPDF

 

palmate