Closed 314eter closed 8 years ago
Hey @314eter, thanks for opening an issue. I'm not sure I understand what's going on here. You said an error is thrown but you didn't provide one -- what error is thrown exactly? Are you able to reproduce the error manually, without using an external tool? You said that this happens when the file is empty -- that makes me think this should be possible to reproduce by replacing the file with an empty pdf file, right? Are you able to reliably reproduce this without using an external tool so that I can try and reproduce it as well?
Steps to reproduce:
original.pdf
and copy.pdf
)copy.pdf
in atom, and scroll down.dd if=original.pdf of=copy.pdf bs=1k count=0
dd if=original.pdf of=copy.pdf bs=1k count=10
The pdf-view in atom is empty during step 3. When copy.pdf
is completely rebuild, it reappears, but the position and zoom-level is reset.
Building a pdf with e.g. latex can take some time. It's annoying that you can't see the pdf during the build, and that the position is lost when it's back.
If the pdf file is changed by an external tool (e.g. latex), the file is empty (which triggers an update) before it gets filled with data. If the external tool is too slow, pdf.js throws an error because the file is still empty. There is nothing to show, and the scroll position resets to 0. On the next update (when the pdf is ready), the scroll position is 0.