Is sending a PDF as encoded byte array in XML sensible
- by simonjwoods
Hi
I am looking to return a PDF from a webservice call. (ATM, a custom proxy is required at the client-side)
AFAICS, there are 2 ways of doing it
a) Return the link to a web-accessible location
b) Encode the PDF and include it in the XML
In my circumstance, a) will require 2 trips from the client, the first to get the path and the second to get the file.
However, wrt b), this link (http://www.coderanch.com/t/279020/Streams/java/wrting-bytearray-xml-file#1283263) suggests that it isn't a good idea to encode a PDF, though without explanation.
I'd be grateful if someone would offer recommendations of the above (and potentially, other alternatives).
Many thx
Simon