Since you are sending that over http you will have...
# suitescript
a
Since you are sending that over http you will have to change the content-type to pdf