RUN_INTERACTIVE
gives a dialog with width, height, etc... How do you automate GIMP to pass these parameters?
#!/usr/bin/python
from gimpfu import *
def dialog( pages ):
try:
img = pdb.file_pdf_load(pages, pages, run_mode = RUN_INTERACTIVE )
except CancelError:
return
register( "pdf", "Import PDF", "Import PDF",
"Sketch", "Sketch", "2018",
"<Toolbox>/Import/Import PDF...", "",
[ (PF_FILE, "pages", "PDF", "")],
[], dialog )
main()
Which gives you an interactive dialog.
But I'd like to automate this.
Once I change it to RUN_NONINTERACTIVE
line 6, in dialog
run_mode = RUN_NONINTERACTIVE )
RuntimeError: calling error
I'd even be fine with an open dialog box,
so long as I could use the script to populate parameters,
but I don't know where you pass those along.