[Tex/LaTex] Fatal error, “Can’t write on file ‘test.pdf’

compilingerrorswindows

I am not the most experienced latex user, so I hope I can describe the problem accurately. When I compile my tex document I get following message:

! I can't write on file `test.pdf'.
Please type another file name for output

! Emergency stop.
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
\fi \fi
l.1 \begin{titlepage}

I run Windows 7 if it helps and I use following packages.

\documentclass[a4paper,10pt]{report}
\usepackage{hyperref}
\usepackage{amsthm}
\usepackage{cleveref}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{appendix}
\usepackage{import}

Best Answer

I have been having a similar problem. It is related to the pdf getting locked by Adobe Reader. Once Adobe opens the file, the compile error occurs. I delete the files (like the questioner), and compile works, but the error returns when I open it again in Adobe. I don't think the [g], as Martin Schroder suggests, was the solution.

Related Question