intellij-pdf-viewer
intellij-pdf-viewer copied to clipboard
pdf 404 not found when the file path has special characters (&, #, =)
when I use split and move right on the pdf in goland, it will show 404 not found
It works fine for me in goland. You mean if you open a pdf when there is only one tab group, and then right-click and click and select 'Split and move right', then it will show a 404? Can you provide a screencast of that? What version of the plugin are you using?
yes , plugin version is 0.15.0. goland is 2022.3.2
then ,I try to open another pdf ,it also show 404 not found It didn't work until I restarted the goland.
Interesting, I still can't reproduce the issue. Does it work in IntelliJ? What operating system are you using? Do you have any special characters in the project name like in #29? Could you upload idea.log? Help > Show log in explorer
I only use goland, so I don't know if it works in IntelliJ my operating system is windows 11. my project name like D:\ProgramData\a_b\c-d-e. Attached is the log log.txt
I modify my project named D:\ProgramData\a\b, but it also doesn't work
Many thanks for your help. Unfortunately I still have no idea what's causing this. I cannot reproduce the issue with GoLand 2022.3.4 on Windows. I suspect we need to improve logging in the plugin to figure out cases like this. If you ever find out more cases where it works or doesn't work, let us know.
I'm also getting the 404 Not Found error. Before that, I did get a message that said the PDF was missing.
@snbudzisz What is your operating system, IDE and plugin version? Can you reproduce the problem in a different/new project?
I have Windows 11 Home, IntelliJ IDEA Ultimate 2023.3.2, and PDF Viewer plugin version 0.15.0.
It did work for a new project. It seems that IntelliJ was having issues writing the out folder in my LaTex project. I had a directory in the path that included an & in the name. I renamed that file folder to remove the ampersand, and it's now working.
Thanks! Then I suspect this issue is a duplicate of #29 after all
I have also encountered this problem. Is there any solution?
@jhzgjhzg Yes, make sure you don't have any special characters like & (or Chinese characters?) in the project path and pdf path and it should work fine
I've been able to recreate this problem. The path I'm using is,
C:\OneDrive\OneDrive - Abcdefghi Asdfghj Mnbvcx\Documents\PyCharmProjects\ABC_DEF\ghij_decomposition_N=8.pdf
where I've obfuscated the filename slightly for privacy reasons (but only insofar as replacing words with random strings of the same length).
I can't change the fact there are spaces in my filename, because that's the directory OneDrive chose for me (it's an enterprise OneDrive).
@jaredjeya Thanks for the path, I can confirm that = characters are also an issue. If you remove that one from the file name and restart the IDE then it should work again. Spaces should be no problem (though OneDrive might be a problem, not sure)
Does this relate to https://github.com/FirstTimeInForever/intellij-pdf-viewer/pull/110?
Help -> Diagnostic Tools -> Debug Log Settings, then input:
com.firsttimeinforever.intellij.pdf.viewer.jcef.PdfStaticServer
Then Help -> Show Log in ...., you can check the log file.
@liudongmiao I thought about that as well, but I tested after your changes and the issue remains.
I just tested again with 19e5c508f4b26bcab2f0fc1fdbd7036f46b7c826 (which was not merged) and that does appear to fix the issue with = and & but not with #.
Interestingly, when I open a file in firefox then = will remain in the url but # will be encoded to %23 before opening, so maybe further encoding is required? @slideclimb Do you have any more information on what you tried?
Please check the artifacts plugin https://github.com/FirstTimeInForever/intellij-pdf-viewer/pull/112/checks
I have checked with name pdftest - _ . ! ~ * ' ( ) ; ? : @ & = + $ , # [ ] ✨.pdf on macOS.