Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:21:29+00:00 2026-06-14T06:21:29+00:00

The requirement is to show some text in a pdf which has a hyperlink

  • 0

The requirement is to show some text in a pdf which has a hyperlink underneath to a site/pdf/etc – similar to HTML where you will see please click here and here opens up a link.

I’m using PlanetPress to create the pdf, which basiclly is PostScript code with added vitamins and iron.

Acrobat automatically creates links when http:// is found within the text, as a consequence PlanetPress does not handle links directly (because they are created automatically by Acrobat).

I can create static links that meet our requirements by passing PDFMark PostScript code directly through PlanetPress however when I try to do the same dynamically for a number of lines of code, the final link within the list becomes the link for each line.

In PlanetPress I’m basiclly looping through an XML file and sending the results to the .ps file.

Here is my PDFmarks code:

        passthrough('[ /Rect [ 0 0 16 '+inttostr(floattoint(&j))+' ]')
        passthrough('/Action << /Subtype /URI /URI ('+&CentreCodeLink+') >>')
        passthrough('/Count '+IntToStr(&i)+'')
        passthrough('/Subtype /Link')
        passthrough('/Border [ 1 1 1 ]')
        passthrough('/ANN pdfmark')

I’ve used the /count filed to determine that different values are being read/passed to the PostScript File.
I’ve used the /rect & /border fields to create a hyperlink area. I thought that the rectangle would be the boundries of the hyperlink area however this isn’t the case it seems.
I’ve tried using moveto to ensure the cursor is moving along the page but this has no effect on the end result at all.
passthrough(‘ ‘+inttostr(floattoint(&width*72))+’ ‘+inttostr(floattoint(&j))+’ moveto’)

I don’t really know PostScript but I think this is a chunk of the output of two links (I’ve cut the links down because they were real links)

0 0 *m
213.9994 30.00256 *m
0 35.00296 *m
*gr
*gs
[1 0 0 1 0 70.75305]concat
 /^PP$ {systemdict /show get exec} *bd
&body /$ 1 index 2 get store /_ 1 index 6 get store 1 get *sf
 /^PP$ {systemdict /show get exec} *bd
&bold /$ 1 index 2 get store /_ 1 index 6 get store 1 get *sf
36 12.00037 *m
36 12.00037 *m (London - Hammersmith) $
165.6 12.00037 *m
&weblinkstyle dup 0 get [9 0 0 -9 0 0] *mf *sf
 /^PP$ {systemdict /show get exec} *bd
[] 0 setdash
/$ 1 index 5 get dup 0 {1 1 0 0 *sc}*bi put store /_ exch 8 get dup 0 {1 1 0 0 *sc}*bi put store
165.6002 12.00037 *m (London - Angel) $
([ /Rect [ 0 0 540 16 ]) cvx exec
(/Action << /Subtype /URI /URI \(http://WelcomePacka5LondonAngel/\) >>) cvx exec
(/Count 1) cvx exec
(/Subtype /Link) cvx exec
(/Border [ 1 1 1 ]) cvx exec
(/ANN pdfmark) cvx exec
( 540 16 moveto) cvx exec
 /^PP$ {systemdict /show get exec} *bd
&bold /$ 1 index 2 get store /_ 1 index 6 get store 1 get *sf
36 24.00073 *m
36 24.00073 *m (London - London Bridge) $
165.6 24.00073 *m
&weblinkstyle dup 0 get [9 0 0 -9 0 0] *mf *sf
 /^PP$ {systemdict /show get exec} *bd
[] 0 setdash
/$ 1 index 5 get dup 0 {1 1 0 0 *sc}*bi put store /_ exch 8 get dup 0 {1 1 0 0 *sc}*bi put store
165.6002 24.00073 *m (London - Bridge / Borough High Street) $
([ /Rect [ 0 0 540 28 ]) cvx exec
(/Action << /Subtype /URI /URI \(http://WelcomePacka5LondonBridge/\) >>) cvx exec
(/Count 2) cvx exec
(/Subtype /Link) cvx exec
(/Border [ 1 1 1 ]) cvx exec
(/ANN pdfmark) cvx exec
( 540 28 moveto) cvx exec
 /^PP$ {systemdict /show get exec} *bd

Any ideas why these don’t work?
I was thinking maybe I need to have a break between each pdfmark box as they seem to share a border now but I don’t know how to do this.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:21:30+00:00Added an answer on June 14, 2026 at 6:21 am

    The /Rect does define the rectangle for the link. But it looks like the code has the lower left value of the rectangle at 0, 0 for all the rectangles. So the rectangles are overlapping, thus the top one (the last one created) would be the one that gets activated when clicked. Remember, /Rect is [ "lower left x" "lower left y" "upper right x" "upper right y" ], so the first two values define the lower left point of the rectangle and the last two values define the upper right point of the rectangle.

    “Now I just need to figure out how to redraw the rectangle repeatidly using all 4 points”

    I am not sure I undertsand this additional question. Are you asking, “Now that I have the correct values for the /Rect for the hyperlink, how do I draw a rectangle there?”

    To find all four points of the rectangle you simply use the information from the /Rect
    values. So for example, say /Rect [ 70 680 110 690 ], then the four points for the rectangle are (70,680), (70,690), (110,680), and (110,690). You can use appropriate drawing commands to draw that rectangle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our requirement is to show some text bold and some text as normal style
I have a requirement. I have a text which can contain any characters. a)
I have a requirement to put together an application which will generate a web
All,In my requirement need to send a mail with attached text file, which is
I have a requirement on my current project (a Flex app which will be
Design requirement: Show a list of items the user can pick from After having
I have a requirement to show an EditText at 45 degree angled to horizontal
My Requirement is to show two sub reports in a Report. What I am
I have a requirement that I need to show my records in a gridview
To fullfill a requirement I have to show a tooltip manually for 30 seconds.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.