Does anyone know how to display multiple page PDFs in Xojo web on an iPad without exiting the application to display it?
So far, all l I can get is the first page to display. Scrolling to the next page doesn’t work on the iPad like it does on Windows or Mac.
I should have mentioned that I’m currently using the web HTML viewer to display multi-page PDFs stored on the server.
I thought Monkeybread has a solution:
But I quickly checked the online example using my iPad Air (iOS 9.0) and there I can not select rows in the list of pdfs. So I don’t know whether the mulitpage pdfs actualy would scroll, when using iOS.
But maybe if you check out the DynaPDF examples for Web which come with the mbs plugins, then you will find a solution. (if mbs plugins is available to you).
This is what I use. It works on iPhone and iPad:
Session.myDownloadFile = WebFile.Open(reportAsPDF) 'turn the PDF into something that can display in the browser
Session.myDownloadFile.ForceDownload = False
Session.myDownloadFile.UseCompression = False
Session.myDownloadFile.MIMEType = "application/pdf"
reportDescription.URL = "" 'clear the old PDF
reportDescription.URL = Session.myDownloadFile.URL 'place the PDF into the browser
I’ll try that David, what variable type are you declaring for Session.myDownloadFile ?
Session.myDownloadFile is a WebFile property that I keep as a Session variable so I can re-use it from anywhere, even common Modules.
The example is included with plugins.
You can recompile it with newer version of Xojo and see if the listbox is better there.
You can pass an existing folderitem to WebFile.Open. For instance, in the example method below, I first get a pdf file from the apps parent folder and then I pass the folderitem to the sub “LoadPDF”.
(In this case I use a CopyFiles Build step in order to copy the PDF file to the Apps parent folder)
Dim f As FolderItem = GetFolderItem("").Child("certificate.pdf")
[code]Sub LoadPDF(f As FolderItem)
If f <> Nil And f.Exists Then
currentfile = WebFile.Open(f) // property of WebPage1
currentfile.ForceDownload = False
currentfile.UseCompression = False
currentfile.MIMEType = “application/pdf”
Me.HTMLViewer1.URL = “”
Me.HTMLViewer1.URL = currentfile.URL
logEvent(“PDF file was not loaded into WebDialog”)
Just an update. I had tried several methods that didn’t work. The solution that finally worked for me was converting the PDFs into html files (some static and some dynamically created). They scroll perfectly on both computers and iPads. Looks like I’m finally giving up on PDFs for good!