Hi, I'm currently having trouble with the PDF Viewer Perspective component. I am using 8.1.17 and the WebDev module version 5.1.17.
I'm just trying to do a simple test of loading a PDF onto the PDF viewer using the WebDev module. I have followed all the forum posts to do this, but still can't manage to load the PDF file.
Here is what I have:
-
DB table that holds the file BLOB:
Note that the fileData column is varbinary (MAX). -
Entries get inserted into the DB table from #1 with the fileData column coming from event.file.getBytes() from the File Upload component. (User uploads a pdf using the application and they need to be able to load that PDF later on within the same application.)
-
Named Query: IngotFile/getIngotFile
-
Web Dev doGet: getIngotFile
It runs the named query from #2 and returns the dictionary. I have tested that it does get the correct fileData (when I log it, I see the byteArray.)
-
PDF Viewer source expression binding
The fileId=10 is hardcoded for testing purposes. projectName is the actual project name in my Designer. Just didn't want to reveal customer name.
When I do this, the PDF Viewer just says "Failed to load PDF file."
Is there anything here that I'm blatantly missing?
I have also tried using the Vision PDF Viewer and that component also could not read the files that were saved from using the File Upload component.
What is interesting is that it was able to read the pdf file bytes that were saved using the following in Vision.
These files, however, still do not load on the Perspective PDF Viewer component.