Try to use AEM Forms as a Cloud Service - Communications document generation synchronous APIs to generate PDF(DOR) and according to documentation it supports template path as "reference path of your Experience Manager Repository".
Wondering what will it be like
- content/dam/formsanddocuments/XSDBasedForm.xdp or