Native PDF reader doesn't render PDF files

Hi There, PDF files are not rendering in the native pdf viewer. I hope a bugfix or solution is possible with the information I’ve provided below.

Thanks

Steps to reproduce

  1. Added PDF file to a folder in my vault. Can open PDF in the native viewer, but the contents of the PDF pages are not rendering.

  2. The same problem occurs if I try to embed a PDF file inside a note - the PDF viewer opens, but the pages are not rendering.

Expected result

Should work like this

YT demo for further reference

Actual result

PDF not rendering inside the vault folder:

PDF not rendering inside note:

Environment

  • Operating system:

|Edition|Windows 10 Pro|
|Version|21H1|
|Installed on|‎26/‎09/‎2020|
|OS build|19043.2006|
|Experience|Windows Feature Experience Pack 120.2212.4180.0|

Obsidian version: v0.15.9

  • Debug info:

SYSTEM INFO:
Obsidian version: v0.15.9
Installer version: v0.14.6
Operating system: Windows 10 Pro 10.0.19043
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 31
Plugins enabled: 8
1: Templater v1.12.0
2: Dataview v0.4.20
3: Dictionary v2.21.1
4: Calendar v1.5.10
5: QuickAdd v0.5.5
6: Citations v0.4.4
7: Annotator v0.2.6
8: Advanced Tables v0.13.0

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

  • The first page of the PDF does load for 1 second before going back to the grey unrendered pages of the PDF.

  • Check settings and plugins, everything seems up to date and activated for viewing files of all formats.

Do you see the same problem in the sandbox vault (found in the help menu)?

download and reinstall obsidian.
Post a screen recording of this happening in the sandbox vault.

i have the same problem.


Pdf doesnt render.
Also happens in the sandbox vault.

weirdly enough it works for some pdfs just not for this one.

If it’s just one PDF, the problem is that PDF.

I have the same problem: PDFs that used to render stopped rendering in one specific vault since the 1.0 update. The error happens both for pdfs embedded into a note and when I open the pdf on its own within Obsidian. In both cases I only get blank space where the PDF is supposed to show (not even the frame, page numbers etc. from the pdf reader, unlike in one of the other screenshots shown).
I noticed this seems to apply only to pdfs in a subdirectory and not to top-level pdfs.
I could not reproduce the error in another vault. However I tried to reset the problematic vault by deleting the .obsidian folder, but the problem persisted.

1 Like

I have exactly the same problem.

post a screen recording of this not working in the sandbox vault and attach a copy of the pdf.

Faced the same issue with a few pdf files with exceedingly long names, in an already deep folder’s hierarchy I archived my old files into as per the P.A.R.A method. Renaming these files into a short name worked for me while testing the behavior.
However, it’s worth mentioning that I encountered another issue when renaming the files, which I had to sort out first which just may well be the underlying issue though I will not bet on it, except saying that each file with that issue produced the same behavior in Obsidian, and got resolved in the same way.

1 Like

I have this exact same problem on Windows 10.

I only have one plugin. I tried updating the installer but still doesn’t work. This problem only occurred after the upgrade to 1.0+.

I can export to PDF fine but even those exports cannot be displayed inline or in Obsidian. I use Foxit Reader as my default PDF reader on Windows if that information is of any use.

post a screen recording of this not working in the sandbox vault and attach a copy of the pdf.

I have a bit more useful information.

The problem has to do with the location of the vault. My vault is stored on a Windows SMB share. If I create a local vault and add a PDF, everything works as you would expect.

Obsidian can locate the PDF in the vault on the SMB share. It can even display PNGs in the vault on the SMB share, it just can’t display PDFs. It looks like the issue is related to PDF file paths in Obsidian when those paths are on SMB shares and nothing to do with the actual rendering of PDFs.

1 Like

This is not a bug then. For security reasons in recent versions of Electron remote iframes (which the pdf viewers uses) won’t load. You need to map you network location to a (virtual) local drive.

2 Likes

Yes. That fixed it.

Thank you very much for your assistance.
:smile:

I’m having the same issue. I can see the scroll but can’t see any pages. I’ve already tried disabling all my plugins by turning on safe mode to no avail. I’ve tried it in the sandbox vault and run into the same issue. I even have this issue when I open the pdf in a new tab.

It seems that downloading and running the Obsidian installer fixed the issue.

2 Likes