Does anyone know of a way to return a PDF from a S...
# suitescript
d
Does anyone know of a way to return a PDF from a SS2.0 restlet without having to write to the file cabinet?
b
not really
your closest option is to return the base 64 contents of the file
d
Thanks, guessed that'd probably be the case. Got it writing to the file cabinet now - just trying to work out how to redirect without Netsuite responding with a 404
b
From a suitelet, I can return a pdf as a response and access that from the client script. It gets rendered in the browser tab and the user can download/print from it. Could you do the same with the restlet?
d
I was actually refactoring to a restlet as we'd used a suitelet and were hitting governance in some cases. Seems you can't return the PDF directly. It's now all working - I'm writing to a static file location and redirecting the browser from the client script.