Problem previewing PDF

I copied the PreviewPDF method from the EE-Web example into my app. The example compiles without error, but Xojo fails when I try to compile my app. When I opened the examples, it said I was opening a file from a newer version of Xojo which surprised me because I am running 2022r1.1, the current version.

It flagged Session.PDFFolder.DeleteFile which I was able to cure with Session.PDFFolder.Remove

The big problem is with dat.Add(Session.PDFFolderItem.Base64Data) The error message says

ReportsPage.PreviewPDF, line 15
Type “FolderItem” has no member named “Base64Data” dat.Add(Session.PDFFolderItem.Base64Data)

I tried using EncodeBase64 but that only works with strings. Apparently the old Base64Data converted the websile to a string that base 64 encoded it. Any help resolving this will be greatly appreciated.


Looking at the EE-Web example confirms that it does not throw an error. It just doesn’t do anything. The app never starts.

1 Like

Ooh, maybe you found a bug to send in for the bug bash that is now in effect?

Hi @Dean_Davidge

That example has been fixed for the next release. Can you try this instead? How To Download and Preview PDFs in Xojo Web Apps – Xojo Programming Blog