0

I am converting PDF to image using GhostScript. The problem i am facing is when pdf has links then i need to have those clickable links in converted image as well. How could i achieve this.

Paulo Soares
  • 1,896
  • 8
  • 21
  • 19

1 Answers1

1

How do you expect an image format to have 'clickable links' ? What image format do you think has the ability to click on links ?

KenS
  • 30,202
  • 3
  • 34
  • 51
  • I am using Area map to do the task but as per my calculation its hovering to wrong text. Not the actual link. You can see this in my code below for reference. https://pastebin.com/jcGRNTmP – Farrukh Iftikhar Mar 07 '18 at 08:15
  • 1
    I still don't see what it is you are asking for, and a random sequence of XML doesn't help. Image formats can't contain hyperlinks so I don't see how you expect Ghostscript to produce an image 'with clickable links'. – KenS Mar 07 '18 at 08:28
  • Forget about what i am sharing. Simple question is I have to preserve clickable links in image while converting PDF to image using ghostscript. How to do that.? Means how to calculate link area to map the area in image. – Farrukh Iftikhar Mar 07 '18 at 09:20
  • check this post as well. https://stackoverflow.com/questions/10591874/render-pdf-as-image-and-extracting-hyperlinks – Farrukh Iftikhar Mar 07 '18 at 09:43
  • 1
    Reading (very much) between the lines, it seems what you are asking for is **2** things; firstly to render a PDF file to an image, and secondly to (in some undefined manner) extract from that same PDF, the location of hyperlink annotations in the original PDF file. The post you point to above seems to me to have all the relevant information already. – KenS Mar 07 '18 at 09:50
  • But this post doesn't have the required solution – Farrukh Iftikhar Mar 09 '18 at 15:02
  • It contains all the information to create a solution as far as I can see. – KenS Mar 09 '18 at 16:55