Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8804737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:41:02+00:00 2026-06-14T01:41:02+00:00

This is what i would like to do: Get a 64base byte array from

  • 0

This is what i would like to do:

Get a 64base byte array from database (which is actually in pdf format). This works.
Then i would like to show the pdf in a webbrowser component.

I first started with saving the pdf to a file.pdf and then open it:

        byte[] bitjes = isc.GetFileById(fileid); // Getting the bytes

        FileStream stream = new FileStream(@"C:\NexusPDF\" + filename, FileMode.CreateNew);
        BinaryWriter writer = new BinaryWriter(stream);
        writer.Write(bitjes, 0, bitjes.Length);
        writer.Close();

        webBrowser.Navigate(@"C:\NexusPDF\" + filename);

But that gave me all sorts of problems involving read/write acces. So i figured i have to use the memorystream class to solve this problem.

        byte[] bitjes = isc.GetFileById(fileid);

        MemoryStream memstream = new MemoryStream(bitjes);

        BinaryWriter writer = new BinaryWriter(memstream);
        writer.Write(bitjes, 0, bitjes.Length);
        writer.Close();

But here’s where i’m stuck! I can’t just show this in a webBrowser component can i?
Do i have to use the binaryreader before i can show the pdf?

Am i approaching this problem the right way, or are there better alternatives?

Main thing is that i don’t want to save the file on disk.

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:41:03+00:00Added an answer on June 14, 2026 at 1:41 am

    You may be able to use the data URL scheme. This URL scheme specifies the content inline.

    webBrowser.Navigate("data:application/pdf;base64," + X);
    

    Where X is the base 64 string.

    No need to convert the base 64 PDF string into a byte array!

    See http://www.ietf.org/rfc/rfc2397.txt for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have JSF code like: <h:inputText id=from value=#{fromToMBean.fromName}/> I would like to get this
I have this design which I cannot seem to get right, I would like
I would like get 3 random stamps, but each from different country. This query
I have a string Like this: MyText (1,151) I would like to get with
I've ignored this topic for really long time and I would like to get
I'm new on this, and I would like to get some advice because I
I would like to send a html string with a GET request like this
I would like to have declaration like this: void Date::get_days_name(const Date& = this) which
I would like to perform something similar to this (ie get the sum of
I would like to get a Page URI from the Tridion Page PublishPath (URL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.