Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opening PDFs with #page=<pageNumber> #4409

Closed
1 task done
Wombosvideo opened this issue Sep 25, 2024 · 1 comment
Closed
1 task done

Support opening PDFs with #page=<pageNumber> #4409

Wombosvideo opened this issue Sep 25, 2024 · 1 comment

Comments

@Wombosvideo
Copy link

Wombosvideo commented Sep 25, 2024

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • The feature request has not been suggested in this repository.

The Missed*

Is your feature request related to a problem? Please provide a clear and concise description of what the problem is.

  • Links to PDF files, i.e. in markdown files or the markdown preview do not support the page hash for directly linking to a specific page
  • The broadly suggested PDF extension vscode-pdf is not actively maintained

The Solution*

Please provide a solution you would like to have.

  • Be able to open links to specific pages using filename.pdf#page=<pageNumber>

Anything Else?

Add any other context about the feature request below.

@James-Yu
Copy link
Owner

It's not possible without some fundamental changes at vscode. From the extension perspective, we receive a vscode.Uri passed to resolveCustomEditor in class vscode.CustomReadonlyEditorProvider. However, in the URI, no hash information is provided. It means that the extension has no way to know if the clicked link has a hash component or not.

I don't think it is an easy change on the vscode side. However, there is no easy or hard or dirty workaround to obtain the hash string otherwise.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants