[scribus] script to convert e-mail and web addresses to PDF links

Gary Dale garyndp at gmail.com
Tue Nov 13 16:04:47 UTC 2018


On 2018-11-09 9:37 a.m., Gregory Pittman wrote:
> On 11/9/18 3:23 AM, ale rimoldi wrote:
>> 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...
> One curious thing is that Adobe Reader used to recognize addresses and turn them into links (once to set this in Preferences), but it doesn't anymore. Perhaps this is related to the fact that Adobe hasn't updated AR since 9.5.5.1... I know it used to work.
>
> I also see that when I hover over an email address, a tooltip pops up with mailto: and the address, but that doesn't do anything either.
>
> Greg
>
I checked with Acrobat Reader XI running in wine and it did identify web 
and e-mail addresses and made them clickable. Okular, on the other hand, 
didn't. Neither did the Evince Document Viewer.



More information about the scribus mailing list