Extracting internal page links from PDF
- Dominant language
- JavaScript
- Stars
- 333
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
At present, when converting a PDF that contains links that have been created in the PDF they are extracted and displayed in the 'pagelinks' layer in the viewer. If you want to create an internal pagelink within the viewer you set the href to '#page-6', for example', go jump to page 6 of the document. However if there are links created in the PDF (as invisible rectangles, which works for email snd weblinks) and the weblink is set to '#page-6' then the links are not extracted. I have also tried adding the links as 'go to a page in the document' links, but these don't get extracted either.
Is it possible to create links in the PDF that link to internal pages, that will then be extracted during the conversion process?
EDIT: I can confirm that if you set the internal link value to 'http://#page-5' it will extract the links. But obviously the links have 'http://' prepended to them when what we want is just '#page-5' to jump to an internal page in the viewer.
Thanks,
Pat
Contributor guide
Research direction
No file or test entry point is named in the issue. Start by tracing how PDF-created links are extracted into the viewer's pagelinks layer, comparing external links with '#page-6' and 'http://#page-5' cases. Done means internal PDF links are extracted as '#page-N' without an unwanted 'http://' prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100