1

I found this script which I modified a bit to open a pdf based on a page number given in the attribute list. Upon trying to execute the action it works just find but QGIS (3.4.15) is crashing!

Any ideas why QGIS is crashing or if there is something not working properly within the code?

My modified code:

import subprocess
import os
path_to_pdf = os.path.abspath(r'[% "PDFpath" %]') 
path_to_acrobat = os.path.abspath(r'C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe') 
process = subprocess.Popen([path_to_acrobat, '/A', 'page=[%PDFpage%]', path_to_pdf], shell=False, stdout=subprocess.PIPE) 
process.wait()

1 Answer 1

1

getting rid of

process.wait()

solved the issue!

1
  • Could you please mark your answer as solution? Thanks! :) Commented Dec 13, 2021 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.