[scribus] script to convert e-mail and web addresses to PDF links
ale rimoldi
ale.comp_06 at xox.ch
Fri Nov 9 08:23:42 UTC 2018
hi gare
> New to Scribus scripting and because of the version of Scribus and
> Ghostscript I'm running, exporting to PDFs is a pain. I have to save
> the .sla file then fire up my laptop, which is running an older
> version of Debian, to create the PDF. Debian/Buster has a problem
> with importing postscript & PDFs and with creating PDFs.
>
> However the far larger problem I'm currently having is that I have a
> hundred-page document with hundreds of e-mail addresses and a lot of
> web addresses that I'd like to automatically locate and create
> external links for. Doing this by hand will take forever.
>
> After manually creating a few then looking at the .sla file, I note
> that the PDF links are, as expected, not really associated with the
> text. Instead, as the create sequence implies, they are associated
> with a bit of real estate on the page that (hopefully) aligns with
> some underlying text or image.
>
> This suggests that a script would need to:
>
> 1) seek e-mail addresses (identified by text that looks like an
> e-mail address),
>
> 2) identify the position and size of the address on the page,
>
> 3) create a PDF link element with that address.
>
> Has anyone seen / used such a script or something similar that I can
> work from?
i don't think there is a way to do this through scripting.
and automatically adding the pdf link frames from c++ is imo not
a good idea at all.
one simple solution, is to rely on the pdf reader to make links
clickable. many readers do it.
the other way -- a more long term one -- is to come up with a good way
to do that through "formatting".
does anybody have an idea how to edit and display links in scribus.
if yes, please make a proposal in this list or add a ticket to the bug
tracker (https://bugs.scribus.net).
it's probably not trivial to find the optimal way to do that, but me
might have a few very clever heads around here...
just keep in mind that scribus is mainly a tool for creating pdf that
will be professional printed, so the solution will probably have to
ensure that printed document do look good! (probably, you will not have
underlined urls in a printed document... but you might want them
highlighted in a pdf for online reading...)
sorry, that i cannot give you *the* solution... maybe, somebody
will come up with a better idea than the ones of mine...
ciao
a.l.e
More information about the scribus
mailing list