0

I'm using MiKTeX 22.7 on windows 10 and when I try to compile any file I get the error: "can't write on filename.pdf". I'm aware this question has already been asked, such as here or here, but I've tried all solutions proposed and nothing worked.

Notice that the problem appeared suddenly, without an apparently explicable reason. I use MiKTeX on a daily bases and I was working on the exact same file just the day before the issue started to occur. The next day I opened the file, recompiled it before doing any change and it would raise the "can't write on filename.pdf" error.

What I tried to do:

  • recompile old tex documents that always used to work
  • delete the existing pdf file and try to recompile
  • create a new simple hello world tex file
  • create such file in a different directory
  • change protection settings of pdf reader
  • temporarily disable the antivirus

What I concluded:

  • the problem does not lie in the tex document
  • the problem does not lie in the folder
  • the problem is not related to pdf security properties
  • the problem is not related to antivirus

Also note that I'm not using any cloud service that could lead to problems due to syncing. That being said I feared it was an issue with this MiKTeX build, so I opened another PC with the same version of MiKTeX, Windows, antivirus and pdf reader and things worked correctly there.

As you can see I'm totally lost on what the problem could be related to or how to solve it.

  • 2
    usually this means the pdf is in adobe acrobat reader, which blocks the file for writing – David Carlisle Aug 01 '22 at 18:47
  • Thanks for not taking the time to actually read the question and thanks for posting as an answer something that I specifically said I already tried and did not work. That was indeed very helpful. – Emanuele Giordano Aug 18 '22 at 10:19
  • There is no answer posted, and actually I see nothing in your question that says whether you have a pdf open in a reader. But anyway this is essentially a system level error not a tex one. The file is not writable so either it is in a folder where you do not have write access or some other application (such as a pdf reader) has locked it. Your description doesn't really give enough information about either possibility to debug. – David Carlisle Aug 18 '22 at 10:51

0 Answers0