In order to write a PDF to a designated folder using Script Manager, the following prerequisites need to be in place:

  1. The script should be configured as event based with an 'OBJECT TYPE' as ASSET and a 'CHANGE TYPE' as ASSET CHANGED.
  2. The name of the Status must be listed in QPS status listings. For example if the Status of a generated PDF changes to 'ReadyToPrint', then 'ReadyToPrint' must be one of your Status listings in QPS.
  3. The base folder for PDF generation, 'C:/Temp/' , must have subfolders created inside of it that match the Publication name(s).

Once you have these prerequisites in place, you can run the script attached to this solution, QxpToPdfOnStatusInDiffFold.js, which will write the PDF file to the correct Publication folder.