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 8817275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:48:24+00:00 2026-06-14T04:48:24+00:00

An .aspx page has a .pdf file in it, like this: <embed src=http://…/ShowPdf.aspx?id=1 type=application/pdf>

  • 0

An .aspx page has a .pdf file in it, like this: <embed src="http://.../ShowPdf.aspx?id=1" type="application/pdf">. Chrome just shows a “Loading” image and hangs without displaying the pdf (chrome pdf viewer and adobe plugin both don’t work). Other browsers open the pdf. Any ideas?

  • 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-14T04:48:25+00:00Added an answer on June 14, 2026 at 4:48 am

    I had this problem too and I finally solved it after several researches.

    What I found is that the HTTP response header should have the following entity-header:

    content-length: file size

    Without specify this header, the web server will put the default:

    content-length: chunked

    I don’t know why Google Chrome has this issue, because as you said, in other browsers like IE or Firefox, they render/open correctly the PDF file.

    Following is my code that I used to solve this problem. It worked in my case and now Google Chrome is displaying the PDF file of my web application!

        System.IO.FileInfo fileInfo;
        fileInfo = My.Computer.FileSystem.GetFileInfo(fullPathToFile);
        Response.AddHeader("Content-Length", fileInfo.Length.ToString());
    

    I hope that I had helped you.

    Here are some references that I found useful:
    PDF Handler Problem with Chrome & Firefox
    What’s the “Content-Length” field in HTTP header?

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

Sidebar

Related Questions

http://www.dofactory.com/Patterns/PatternFlyweight.aspx There is a UML diagram on that page. It has three different kinds
This .aspx page has a very nice set of collapsible sections with little +
A have created a pdf file from an .aspx page using the wkhtmltopdf converter.
There is a aspx page with Master page. This master page has a usercontrol.
An ASPX page has an embedded SWF Object pulling settings from a config file.
I'm writing an aspx page which has to send an http request to a
I have a register page that has a file upload button on it. This
This code will always make my aspx page load twice. And this has nothing
I have a search.aspx page that has this: <asp:DropDownList id=ddlPopulation runat=server DataTextField=population DataValueField=pid> </asp:DropDownList>
Let's assume my ASPX page has no inline C# code blocks. So, I can

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.