Is there any command line script to convert idml to pdf by using Scribus?

Previous topic - Next topic

raymondnexsoftech

Hi all, I'm new to Scribus
I'm now doing some automatic conversion from idml file to pdf in linux server.
Is there any way to convert it by command line instead of open it from Graphic interface?

Thanks for the help

a.l.e

no, it's not currently possible to start scribus without in some way also start the user interface.

but there are ways for "hiding" the ui and you shoud also be able to keep scribus open and process a bunch of files as soon as they come in.

if you need a consultant, just raise your hand : - )

dragonfly

If indeed you are running a (remote) server it is difficult to see how you can run Scribus GUI which is designed to run on desktop and not as a service.

However you could look here at ssh X ...

https://askubuntu.com/questions/886313/what-is-the-simplest-way-to-have-remote-gui-access-to-ubuntu-16-04-server-from

Are you thinking of running a conversion service?

raymondnexsoftech

Quote from: a.l.e on June 17, 2020, 08:29:37 AM
no, it's not currently possible to start scribus without in some way also start the user interface.

but there are ways for "hiding" the ui and you shoud also be able to keep scribus open and process a bunch of files as soon as they come in.

if you need a consultant, just raise your hand : - )

Thanks.
Is there any tutorial / instruction that I can have a look on it?

Quote from: dragonfly on June 17, 2020, 05:41:28 PM
If indeed you are running a (remote) server it is difficult to see how you can run Scribus GUI which is designed to run on desktop and not as a service.

However you could look here at ssh X ...

https://askubuntu.com/questions/886313/what-is-the-simplest-way-to-have-remote-gui-access-to-ubuntu-16-04-server-from

Are you thinking of running a conversion service?

Thanks for your link
And yes, kind of a conversion service
I have a idml file saved in the server as a template. What the server needs to do is to copy the idml file, update the content according to user input, and generate a pdf from the updated idml file.

dragonfly


a.l.e

dear raymond

you seem to be building a commercial service... and that's fine...

and

you got the hints you need to get started.

but

if you need a more personal support, i would like to ask you, what you are giving back... (to the project or to the people who spend their time doing the research for you).

ciao
a.l.e

raymondnexsoftech

Quote from: dragonfly on June 18, 2020, 12:31:30 AM
There is this to explore at pandoc command line (text frame changes) ... but not in Scribus.

https://github.com/jgm/pandoc/wiki/Importing-Markdown-in-InDesign

Thanks for your link.
However, pandoc seems not the tool I want
I can edit the content of IDML file by coding. What I want is to find a tool to just convert the IDML to pdf.
pandoc is the tool can convert the markdown file to ICML, but not convert the IDML to other format.

dragonfly

@raymondnexsoftech

I echo the views of @a.l.e .. "i would like to ask you, what you are giving back.."

You have not given us the full picture.

If the goal is to convert *.idml to pdf there are on line services which I have searched to achieve this. In effect offering what you want.

So why bring Scribus into the loop? Why not use InDesign for the final stage?

However, just as an intellectual exercise, I have thought through how I would achieve this without GUI and on a remote server. You write that you can " edit the content of IDML file by coding". In the same way you can  "edit the content of SLA file by coding".  It is just XML parsing. You need to map IDML elements to SLA elements.



raymondnexsoftech

Quote from: dragonfly on June 18, 2020, 10:43:39 AM
@raymondnexsoftech

I echo the views of @a.l.e .. "i would like to ask you, what you are giving back.."

You have not given us the full picture.

If the goal is to convert *.idml to pdf there are on line services which I have searched to achieve this. In effect offering what you want.

So why bring Scribus into the loop? Why not use InDesign for the final stage?

However, just as an intellectual exercise, I have thought through how I would achieve this without GUI and on a remote server. You write that you can " edit the content of IDML file by coding". In the same way you can  "edit the content of SLA file by coding".  It is just XML parsing. You need to map IDML elements to SLA elements.

Here is what I'm doing:
I worked in a company that wants to build a software can generate a namecard PDF file from a IDML template for the employees.
And the restriction I have encountered is that the linux server is for Intranet and cannot connect to outside world. And the designer can only give me the InDesign file to work with.
I cannot find any InDesign for Linux.
So for now Scribus is the only software fits the requirement. That's why I keep asking on how to use Scribus to convert the file.

And I think there is a misunderstanding that I don't want to ask anyone to do the research for free. I actually just want to know if there is any existing solution for working on command line or similar approach.
And of course, thanks all of you giving the hints and I'm already looking on it.

Hope you all will understand. ;)

Nermander

If the Designer can not give you anything but IMDL, I would say "change designer".

I mean, InDesign should be able to export to a plethora of different formats.

If you can get a PDF, then you there are a lot of software out there that can generate a PDF with the contents (name etc) and that can also overlay this into the template PDF. Very much the same way as you would use a printer to print information onto an already printed form, but done using PDF instead.


dragonfly

Having read your more detailed requirements my suggestion is to first create a Scribus blank template from the original IDML file .. or by starting afresh with Scribus, drawing upon the IDML internal assets (IDML is a zipped file) such as images. That is, migrate from IDML dependency to Scribus only.

Next create a csv file containing the variables you wish to embed in the employee PDF's.  If you follow the tutorial each var is written as %VAR_employeeName%, %VAR_employeeDept% for example. Create this as a spreadsheet table.

Then look at ScribusGenerator https://github.com/berteh/ScribusGenerator in Scripter to embed employee names into the blank template to be batch printed as pdf's. Examples are given in the excellent tutorial (YouTube).

https://www.youtube.com/watch?v=kMsRn38TOiQ

a.l.e

from the available information, ii think that nermander's hint with the pdf workflow is probably the best solution.

otherwise, first converting the IDML into a sla is probably also a good idea (less movable parts).
the scribus generator is also an ok idea, and it iirc can be started from the command line.

and for the scripting, the wiki is full of examples.

ciao
a.l.e

raymondnexsoftech

Thanks all for the suggestions!
I will have a look and test on those ;)