PS_ADD_LOCALLINK(3)
π PS_ADD_LOCALLINK π
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:
fitpagefitwidthfitheightfitbbox
β¨ 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
- debian bookworm: pslib-dev 0.4.7-1+b1
- debian trixie: pslib-dev 0.4.8-1+b1
- ubuntu jammy: pslib-dev 0.4.7-1
- ubuntu noble: pslib-dev 0.4.7-1build2
- ubuntu questing: pslib-dev 0.4.8-1
- ubuntu resolute: pslib-dev 0.4.8-1build1
- ubuntu stonking: pslib-dev 0.4.8-3 Β· GPL-2.0-or-later OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms