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

  • Home
  • SEARCH
  • 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 588809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:21:28+00:00 2026-05-13T15:21:28+00:00

I am having an issue with displaying a PDF in an iframe in asp.net.

  • 0

I am having an issue with displaying a PDF in an iframe in asp.net. When the pdf shows up it is showing up without the Acrobat toolbar that allows the user to zoom and print. This is causing a major hassle for our customers because they cannot read the PDF in the size that it is. If you try and set Acrobat to not show the PDF in the browser and browse to that page you get a message saying that it is trying to open it in Full Screen mode. Any ideas how I can make it not do this from the code? Below is the code I use to stream the PDF to the browser:

Public Shared Sub StreamPdfToBrowser(ByVal doc As Document)
    Dim Ctx As HttpContext = HttpContext.Current
    '// Clear any part of this page that might have already been buffered for output.
    Ctx.Response.Clear()
    Ctx.Response.ClearHeaders()

    '// Tell the browser this is a PDF document so it will use an appropriate viewer.
    Ctx.Response.ContentType = doc.DisplayFileType

    Ctx.Response.ContentType = "application/pdf"
    Ctx.Response.AddHeader("content-type", "application/pdf")

    '// IE & Acrobat seam to require "content-disposition" header being in the response. If you don't add it, the doc still works most of the time, but not always.
    '// this makes a new window appear: 
    Response.AddHeader("content-disposition","attachment[inline]; filename=MyPDF.PDF");
    Ctx.Response.AddHeader("Content-Length", doc.DisplayFile.Length)
    Ctx.Response.AddHeader("Content-Disposition", "inline; filename=E-Sign Specification Report.pdf")

    '// TODO:  Added by KN to possibly fix UA issue
    Ctx.Response.ContentType = "application/pdf"
    Ctx.Response.AddHeader("content-type", "application/pdf")

    '// Write the PDF stream out
    Ctx.Response.BinaryWrite(doc.DisplayFile)

    '// Send all buffered content to the client
    Ctx.Response.End()
End Sub
  • 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-05-13T15:21:28+00:00Added an answer on May 13, 2026 at 3:21 pm

    Launch the PDF in Adobe Acrobat, go to File, Properties and click on the Initial View tab. Here you can set the default view for when people open this specific PDF, it sounds like “Open in Full Screen mode” is checked.

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

Sidebar

Related Questions

I'm having an issue with a standard ASP.NET page that has a TextBox and
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS
I'm having an issue with CruiseControl.net where the web dashboard just won't work in
I'm having an issue displaying an object in a checked list box in C#.
I am quite new to rails... I am having an issue with displaying of
I am currently having an issue where MySQL is only displaying 1 of my
Having an issue here that I have tried everything I can think of but
I'm having an issue where our cell table is only displaying 15 rows. I
I’m having an issue with PDF output being rendered in Adobe Reader’s ‘in browser’
I am having an issue selecting and displaying a substring from each of the

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.