Greetings.
Can you help me with this code?
In Vb.net (WebMatrix) after creating a file in PDF memory we show it in a browser tab with this code:
How would you write the code above for the server in B4J?
Can you help me with this code?
In Vb.net (WebMatrix) after creating a file in PDF memory we show it in a browser tab with this code:
B4X:
Dim ResponseX as System.Web.HttpResponseBase
...
Dim Sal AS MemoryStream.
Sal = HelperPDF(dataX)
ResponseX.addHeader("Content-Type", "application/pdf")
ResponseX.addHeader("Cache-Control", "no-cache")
ResponseX.addHeader("Content-Length","Sal.toarray.Length.tostring")
ResponseX.addHeader("Content-Disposition","inline; filename=test.pdf")
ResponseX.BinaryWrite(Sal.ToArray)
ResponseX.End()
How would you write the code above for the server in B4J?