PDA

View Full Version : Display PDF from binary, without writing file



Movian
10-20-2014, 05:47 AM
so along the same lines as a previous post I need to be able to display a PDF file from binary data stored in an SQL field without writing that file to disk first.

I found a way to encode images in base64 and embed the base64 string in a web page to display it in a Microsoft WebBrowser control, unfortunately this approach doesn't appear to work for PDF files (Apparently it would if it was chrome :( )

This needs to be deploy able to existing clients without the need for installing extra apps, so it either needs to be done using native windows abilities (such as embedding in a web page for display in IE) OR use whichever PDF viewer they have installed (Adobe, Foxit etc etc).

as always I will keep researching while waiting for responses but any help is appreciated!

ranman256
10-20-2014, 09:25 AM
Why cant you just write the pdf to a temp file, then load the pdf to sql field? It dont cost nuthin.

Movian
10-20-2014, 10:44 AM
New security requirements mean I can't use tempfiles and can only generate a file if the user specificaly selects to export it .

If they just want to view the file there should be a way to display it without needing to generate a file....

jonh
10-20-2014, 02:25 PM
How silly. You generate a file every time you open Access.
But whatever.
I guess you tried using the bound object frame and it din't work, yeah?

Tommy
10-22-2014, 10:21 AM
Have you tried to write to the clipboard and copy it to a pdf display? I have no code just a head full of.... :) Sometimes we have to work within the constraints of someone else's world.