The following code prints an empty line as an output which is false. The problem is not in the permissions, since I tested the command with 777 permissions for the pdf -file. How can you fix the command to give a right output?
import subprocess
from subprocess import PIPE, Popen
output = Popen(['pdftotext', '/home/aal/Desktop/lkn_pdf/appa.pdf'], stdout=PIPE).communicate()[0]