PS_ADD_LOCALLINK(3)

okay bestie, so we're in the Library Functions Manual section and this page is literally about PS_add_locallink β€” the glow-up your PDF needs when you want a clicky link that jumps to another page in the same document. yes, same doc. no leaving. periodt. ✨


πŸŽ€ NAME πŸŽ€

PS_add_locallink β€” adds link to a page in the same document

like, that's it, that's the whole job, and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <pslib.h>

void PS_add_locallink(PSDoc *psdoc, float llx, float lly, float urx,
float ury, int page, const char *dest)

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this function drops a hyperlink at the position you tell it about, and that link points to a page in the same document. When someone clicks it? boom, they jump straight to the page you named. iconic behaviour, no cap.

Heads up: the very first page in a document is numbered 1. not zero. one. we're not doing programmer math here, bestie 🫢

The parameter dest decides how the document gets viewed once you land there. It can be:

  • fitpage
  • fitwidth
  • fitheight
  • fitbbox

✨ pick your vibe ✨

Now, the hyperlink itself starts life as a rectangle β€” lower left corner sitting at (llx, lly) and upper right corner at (urx, ury). By default that rectangle is rockin' a thin blue border. cute, right?

😭 okay so real talk: the hyperlink will not be visible if the document is printed or viewed. but she will show up if the document gets converted to pdf by either Acrobat Distillerβ„’ or Ghostview. so like… she's shy until the pdf glow-up. we've all been there.

🌈 SEE ALSO 🌈

(the whole link girlie squad, go read them too πŸ’œ)


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Uwe Steinmann uwe@steinmann.cx. absolute legend, we love him, mwah πŸ’‹


and that's the whole page bestie!! this was PS_ADD_LOCALLINK(3), straight out of the Library Functions Manual β€” no date, no version, just vibes and a function that slays. go make some clickable links, you main character πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from