title: Python InDesign scripting: How to run a preflight check?
body: <p><a href="https://github.com/lohriialo/indesign-scripting-python" rel="nofollow noreferrer">This guide</a> provides a very good overview of InDesign scripting using Python. I am able to open my document and export it to a PDF, but in addition to that I want to check if any textboxes have some overflowing text. I wanted to accomplish this using some preflight checking, but when I tried to call</p>
  <blockquote>
  <p>myPreflight = app.PreflightProcesses.add(myDocument, myProfile)</p>
  </blockquote>
  <p>I got the error &quot;Missing required parameter 'TargetObject' for method 'Add'.&quot;, although according to the <a href="https://www.indesignjs.de/extendscriptAPI/indesign-latest/#PreflightProcesses.html" rel="nofollow noreferrer">documentation</a> I did provide the target object.</p>
  <p>I would really appreciate a concrete example on how to check for overflowing text, as I am rather new to this approach. Thank you for your time!</p>