Problems downloading PDF from web app

After spending most of a day figuring out that Graphics.TextWidth does not work with Helvetica fonts, I found the new PDF feature easy to use. That was until I started downloading them to the user. Google Chrome always flags it as having a virus. Firefox displays the PDF properly, but ends the session. I tried using a hashtag, but the Back button takes me to a brand new session that requires the user to log in again (different session identifier). The UserDisconnected event fires that I might be able to use to log the user in again and take him back to the originating page, but I have no idea how to approach that. Thankfully, Microsoft Edge and Safari (on an iPad) seem to work properly.

Help solving the Google and/or Firefox problems would be greatly appreciated.

Question: did you try the examples in the Xojo example folder and check if those are working without any issue. I haven’t used yet the new pdf functionality as I using DynapPDF from MBS. But this would be my approach: checking if it is my pdf code, or if the official examples have the same issue. If the latter is not the case, then it would be good seeing (parts of) your code … otherwise it is utmost impossible to hep.

I patterned my routine on the EE-PDF-Web example. Instead of displaying the PDF in an HTMLViewer, I would like to assign it a filename and download it as a webfile and have it open in a new tab in the users browser. Managed to get it to work the way I wanted may making the HTMLViewer invisible and not assigning the filename until after WebFile was opened then using the HTMLViewer.LoadURL function.

I too have used DynaPDF in the past. It has a lot more capability than I need and now that I know how to properly download it, the Xojo PDF is easier to use.

1 Like