0

I'm trying to create a link in a pdf to another page from a .Net cshtml file. after some research I've found that the best way to go about this seems to be:

<a annots="goto:@pageNumber"> @pageNumber </a>

However, this doesn't seem to do anything when i generate the pdf. Any ideas why?

thanks

Darth123
  • 27
  • 7

1 Answers1

1

To target an HTML link to a specific page in a PDF file, add #page=[page number] to the end of the link's URL.

For example, this HTML tag opens page 4 of a PDF file named myfile.pdf:

<A HREF="http://www.example.com/myfile.pdf#page=4">

Hevar
  • 1,474
  • 1
  • 13
  • 24
  • The problem with this is that I need to view the pdf within an embedded viewer, and doing it this way links to the correct page but in a different browser tab – Darth123 May 23 '17 at 11:40
  • Ohh, I see. These might have some valuable info: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf https://www.abeautifulsite.net/link-to-a-specific-page-in-a-pdf-file – Hevar May 23 '17 at 11:45
  • also navigating to the page using #page=[page number] doesn't seem to work at all in Edge. Any ideas how I could work around that? – Darth123 May 23 '17 at 15:01
  • It seems to be a browser issue. Seems to be more people out there with the same problem, and no solution... :( – Hevar May 23 '17 at 18:48