unfortunately this is not possible.
Sorry, I noticed your post only now. Not sure I understand what you need. Let me know and I will try to help. Is it the "search for a path" js script you ask about?
For the original problem, btw, I found a faster solution for me. For that, I had to modify a little some print-ready exporting code of the FPD ( the tcpdf library ).
Do you also need to add a cut line? Is it some simple geometric figure ( in my case it is just a rectangle of a specific color ). I modified the code which creates the PDFs on export and it just "draws" my cut line into the pdf file being created for export.
I can share the code here if needed. The downside, of course, - each time there is a new version - I need to compare and merge my code in again ....