speedata / publisher

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

Feature Request - Link to specific area of Image #462

Closed Demosteneus closed 1 year ago

Demosteneus commented 1 year ago

Hi,

I was wondering if it is possible to create a link to specific area of an image. I have tried the < Overlay > element with < Position x="60" y="70" > and tried placing an Action + Mark inside a Textblock, but this didn't work. Also, I tried printing a Paragraph inside the Textblock and then the Action + Mark inside the Paragraph, but this also doesn't work.

Would it be possible to make Action available directly inside Position and be able to link to that position?

<Overlay>
  <Image width="{$img_width}mm" height="{$img_height}mm" file="{$image-file}"/>
  <Position x="60.5" y="70.9">
      <Box width="2" height="2" backgroundcolor="red"/>
      <Textblock>
          <Action>
              <Mark select="'hotspot1'" pdftarget="yes"/>
          </Action>
      </Textblock>
  </Position>
</Overlay>

<Paragraph>
   <A link="hotspot1"><Value select="'Link to hotspot1'"/></A>
</Paragraph>
pgundlach commented 1 year ago

Interesting. I could not find an easy solution for that, let me think about this. The syntax looks fine (perhaps the Action should be used without Textblock)

pgundlach commented 1 year ago

I still have not found a solution and I think it would be non trivial to implement one. So I am thinking of closing this as “wont fix”. Perhaps I can find someone who can sponsor this issue.

I was thinking about creating something like <Transformation> or <Frame> which wraps around objects and let the user specify a link. For example

<PlaceObject>
  <PDFLink  x="..." y="..." > 
    <Image ... />
  </PDFLink>
</PlaceObject>
pgundlach commented 1 year ago

I am closing this, please re-open if this is still necessary