speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
292 stars 36 forks source link

`bordercolor` for `<A>` #526

Closed pr-apes closed 8 months ago

pr-apes commented 9 months ago

@pgundlach,

would it be possible that <A> accepts the bordercolor attribute that works the same as hyperlinkscolor for <Options>.

Having different types of links (internal and external to the current PDF document), having a way to mark them as different is of great help to the reader (and even the writer).

Many thanks for your help.

pgundlach commented 9 months ago

This is a good idea. Probably only useful for Adobe Acrobat and the other viewers that display the border.

pr-apes commented 8 months ago

I tried to implement this myself, but I failed (I don't know how to create a.bordercolor in commands.lua).

Otherwise, I think it would only require to replace

getBordercolor(options.hyperlinksbordercolor)

with

getBordercolor(a.bordercolor or options.hyperlinksbordercolor)

Of course, it will work only in PDF viewers that display the annotation borders (and allow colored annotation borders).

pgundlach commented 8 months ago

I'll take a look, but this might take a (hopefully short) while.

pgundlach commented 8 months ago

Just a note for me: the commands.xml can be extended like this:

    <attribute en="bordercolor" type="text" optional="yes" since="4.15.7">
      <description xml:lang="en">
        <para>Set the color of the border (Adobe Acrobat ony).</para>
      </description>
      <description xml:lang="de">
        <para>Setze die Rahmenfarbe des links (nur Adobe Acrobat)</para>
      </description>
    </attribute>

(I need to take a closer look)

pgundlach commented 8 months ago

Implemented in version 4.15.7 - you can try it out if you want.

pr-apes commented 8 months ago

Many thanks for your new release, @pgundlach.

It works perfectly fine.