Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to have a PDF downloaded to the user in a web application?
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.

Feedback, Comments & Corrections




Links
MBS Xojo tutorial videos