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

PDF Preview in VS Code #10821

Closed
lw-schick opened this issue Aug 23, 2016 · 10 comments
Closed

PDF Preview in VS Code #10821

lw-schick opened this issue Aug 23, 2016 · 10 comments
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality
Milestone

Comments

@lw-schick
Copy link

  • VSCode Version: 1.4
  • OS Version: Windows 7

It would be cool to have a PDF Preview in vs code. We're using vscode to read our documentation repository, and there are still many PDFs from external service providers we have to keep there...

@sandy081 sandy081 added feature-request Request for new features or functionality *extension-candidate Issue identified as good extension implementation labels Aug 23, 2016
@sandy081 sandy081 added this to the Backlog milestone Aug 23, 2016
@martin-azpillaga
Copy link

This would be great particularly for TeX users.

Being able to compile and see the resulting PDF all from within the editor is unvaluable and would definitely attract TeX users to the VSCode community.

@astewartau
Copy link

astewartau commented Oct 26, 2016

I completely agree. I use VSCode as my primary TeX editor for its simplicity, and would love for it to be able to display PDF files.

@gulshan
Copy link

gulshan commented Feb 8, 2017

Check this extension- https://marketplace.visualstudio.com/items?itemName=tomoki1207.pdf

@wilsenhc
Copy link

It would be excellent, I use VSCode as my main editor for a lot of things including TeX.

I would like to be able to edit & preview my documents in the same editor!

@chengs
Copy link

chengs commented May 31, 2017

The extension (https://marketplace.visualstudio.com/items?itemName=tomoki1207.pdf) you mentioned is nice but not perfect.

It works perfectly when using its preview mode (right click a pdf file and then select View PDF). However, when you directly open a pdf by clicking the name, you may find that it cannot open many PDF documents.

In this direct open mode, the pdf file is firstly loaded as a text file. So it suffers all the limits of reading text files (no binary file, too large size, or wrong encoding). But actually, with pdf.js, only the uri of the pdf is required. I tried to fix this problem and find that vscode has no hook to interrupt the creation of TextDocumentProvider. So the extension cannot work perfectly.

I still suggest vscode make a built-in pdf viewer via pdf.js, for better performance. Indeed, it is not very difficult to integrate pdf.js.

@changkun
Copy link

changkun commented Jun 5, 2017

@chengs built-in a new third-party module is quite dangerous, that's why vscode have extension feature.

The only problem for this issue is rearding how vscode implement reasourceVIewer, see Handle generic Binary Files.

So far, extensions can only process the file that vscode loaded, which means the pdfviewer extension cannot be opened if vscode do not even load it.

If vscode decide to implement a feature that pass the file to extensions before it display a "not open" warning, and check whether there exsists an extension can process the file or not. Then the problem will be simply solved.

Related issue:

@aberardinelli
Copy link

Bumping this thread. It's annoying I can't open pdfs natively in VSCode. My workflow would be so much cleaner if I could.

@andselisk
Copy link

Bumping again. A reliable *.pdf viewer that would work with synctex would indeed make life easier.

@chengs
Copy link

chengs commented Sep 1, 2017

Bumping again

@mjbvz mjbvz added *extension-candidate Issue identified as good extension implementation and removed *extension-candidate Issue identified as good extension implementation labels Mar 6, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 6, 2018

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests