WriteAllBytes error when saving data directive bpm in Kinetic 2024.1.12

I am getting the below error with this line in a c# data directive when saving the directive:
File.WriteAllBytes(“testrwz.pdf”, bytes);

Is there any other way to write bytes in a data directive BPM in Kinetic 2024.1.12?

Please help!

Thanks,
Richard

writeallbytes error

Use memory stream to build then output that via email or something? Hard to direct without more information. Looks like you’re trying to create a copy of the Quote PDF file? Pretty sure there are examples on the forums here to do this.