Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

how to read binary image from database and display it as PDF file?

Hi Everyone,

I have a requirement in which the pdf file are stored as binary image.   When the user click on view I am required to display the PDF file.

How can I convert a binaryi mage  into PDF file?

It is WPf browser application and it does not have htttp.context method?

Any ideas or help or example are much appreciated and thank you very much!
0
developer2012
Asked:
developer2012
  • 2
  • 2
  • 2
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
Response.ContentType = "application/pdf"
      Response.BinaryWrite(your-byte-array-name-here)

http://forums.asp.net/t/1060151.aspx/1
0
 
developer2012Author Commented:
Thanks. But it is not a asp.net application
0
 
CodeCruiserCommented:
>How can I convert a binaryi mage  into PDF file?

If by binary image you mean byte array, write it to a file and then use Process.start to open it

IO.File.WriteAllBytes("path", bytearray)
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
David Johnson, CD, MVPOwnerCommented:
http://www.codeproject.com/Articles/37458/PDF-Viewer-Control-Without-Acrobat-Reader-Installe

do display it within your own app then you will need a pdf viewer control
0
 
developer2012Author Commented:
@ code cruiser . Yes it is bytearray. How do I write to a file?

Can you please give me an example?

Thanks
0
 
CodeCruiserCommented:
I gave you an example: http:#a38422931
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now