MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to have a PDF downloaded to the user in a web application?
Feedback.

Answer: You can use a WebHTMLViewer control and load the PDF file with the PDF plugin from the browser.
Example:
dim CurrentFile as WebFile // a property of the WebPage

// define the PDF file
CurrentFile = new WebFile
CurrentFile.Filename = "test.pdf"
CurrentFile.MIMEType = "application/pdf"
CurrentFile.Data = "some pdf data" // MyDynaPDF.GetBuffer
CurrentFile.ForceDownload = true

// start the download
showurl(CurrentFile.url)
Notes: See our Create PDF example for the Real Studio Web Edition.




Links
MBS Realbasic PDF Plugins