Search code examples
pythonpdfreportlab

How to Remove I/O lock from PDF while modifing it?


I'm writing a python script to generate PDF using ReportLab. So whenever i made changes to my python script, i must have to close the pdf and again re-open it to see the changes. Even i can't compile python script while pdf is open. It produces the error ,

IOError: [Errno 13] Permission denied: 'XYZ.pdf' 

Is there any way to see the changes without closing the pdf ?. Any idea or suggestion would be greatly appreciated.


Solution

  • If you're using Windows, download and use SumatraPDF. It will let you view a document without locking it for writing, and it will even auto-refresh when the file changes.