Trouble viewing pdf on phone

I created a web app that allows a user to get the model number for an electric submeter after choosing all the parameters. At the end, it offers a data sheet or installation guide in pdf format that is displayed in an HTMLViewer. It works fine when viewed from a computer, but the pdf is not visible when viewed on an iPhone or iPad. There is a download button that downloads the pdf file with a name based on the model number. It works fine in a computer browser, but on an iPhone or iPad, nothing is downloaded. You can see this at
https://beta.ezmeter.net. Select the double right arrow button to skip all selection options then choose either Data Sheet or Installation Guide.

Is there a way to make this work with phones and tablets?

On my Android phone there is an ‘Open’ button for the PDF, if I click that the file is downloaded and my phone asks which app I want to use to see the PDF.

If I go to the downloads and click the file name (download.pdf in my phone) it automatically use Google Drive (is a Pixel 6a phone) to show the PDF.

I think this is the normal behavior. I don’t think I have ever seen a PDF on a Web page using my phone.

This is what it when I press Download PDF on my iPhone:

“Do you want to download “RA3343_103_Data.pdf.html”?”

So you may have a problem with your… something…

Eric Williams

This is what it when I press Download PDF on my iPhone:

“Do you want to download “RA3343_103_Data.pdf.html”?”

So you may have a problem with your… something…

I’d sure like to know what …something… is.

My iphone never asks the question. It just sits there with the URL box showing the subdomatin followed by hex numbers that go off the screen. This is my download code:

Session.PDFFile = Nil
Session.PDFFile = New WebFile
Session.PDFFile.MIMEType = “application/pdf”
Session.PDFFile = WebFile.Open(Session.PDFFolderItem)
Session.PDFFile.ForceDownload = False
Var a As String
If Drawdata Then
a = “_Data.pdf”
Else
a = “_Install.pdf”
End If
Session.PDFFile.Filename = MainPage.ModelNum + a
Call Session.PDFFile.Download

PDFFile.ForceDownload = false but then you use the .Download function?

If you’re just trying to show it instead of download it, what about Session.GoToURL(PDFFile.URL)?

1 Like