Giter VIP home page Giter VIP logo

Comments (10)

hholzgra avatar hholzgra commented on August 10, 2024

That's a very good idea ...

... unfortunately the current version of Cairo Graphics does not have support for adding hyperlinks yet.

Support for that has been added to the upcoming Cairo 1.15 release series, but so far there are only snapshot releases of that and no official stable releases.

from maposmatic.

mrbrown8 avatar mrbrown8 commented on August 10, 2024

No worries! Thanks for the consideration.

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

Ubuntu now comes with a Cario Graphics version that has support for PDF links, but the pycairo version is still to old for it as of yet (has pycairo 1.16.2, needs 1.18)

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

I tried to create page number links with self built PyCairo 1.18.1, and it somewhat works, but only if the page number linked to is smaller than the current page aka. the page is already created, links to page numbers larger than the current page, so to pages that will only get rendered in the future, don't work yet.

This turned out to be a known Cairo bug: https://gitlab.freedesktop.org/cairo/cairo/issues/336

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

Found a workaround, page edge arrows are linked to their target pages now.

Still missing:

  • links from the overview pages grid to detail pages
  • links from index entries to actual map pages

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

See e.g. https://print.get-map.org/results//040800_2018-12-01_23-41_sylt-pdf-link-test.pdf for a map with working links

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

New showstopper: index lines are rendered with Pango, not with CairoGraphics directly, and on that layer PDF Hyperlink support is still missing:

https://gitlab.gnome.org/GNOME/pango/issues/290

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

"links from the overview pages grid to detail pages" now added by putting a transparent rectangle over the page number and having that being linked

from maposmatic.

mrbrown8 avatar mrbrown8 commented on August 10, 2024

I saw that Cairo 1.16 was just released. I looked at your test PDF and it looks encouraging. Thank you for carrying on this request.

from maposmatic.

hholzgra avatar hholzgra commented on August 10, 2024

I created a new issue for the missing clickable index entries, so I'm closing this one as the original request has long been fulfilled.

from maposmatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.