Chrome fails to display embedded pdf files when they are dynamically created2019 Community Moderator ElectionProper MIME media type for PDF filesMerge / convert multiple PDF files into one PDFInserting a pdf file in latexProgrammatically download embbeded dynamic-generated PDFsCannot display HTML stringDisplay PDF in a browser Only ONCE and delete it from server C#Oracle APEX 5.0 dynamically embedding PDF into pageExtJs 6 : Embedded document Viewer to display PDF and Office documents?Embedding a PDF file in web-page: content-type octet-steamFile size issue in Chrome for base64-encoded PDF data in OBJECT tag

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

What is Tony Stark injecting into himself in Iron Man 3?

PTIJ: Aliyot for the deceased

Does the in-code argument passing conventions used on PDP-11's have a name?

Why is there an extra space when I type "ls" on the Desktop?

Why aren't there more gauls like Obelix?

Iron deposits mined from under the city

Why is my explanation wrong?

Giving a talk in my old university, how prominently should I tell students my salary?

New invention compresses matter to produce energy? or other items? (Short Story)

Does the US political system, in principle, allow for a no-party system?

Should we avoid writing fiction about historical events without extensive research?

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?

The past tense for the quoting particle って

I can't die. Who am I?

Ultrafilters as a double dual

What is better: yes / no radio, or simple checkbox?

How to make sure I'm assertive enough in contact with subordinates?

What is the purpose of a disclaimer like "this is not legal advice"?

Practical reasons to have both a large police force and bounty hunting network?

Is being socially reclusive okay for a graduate student?

Is there a way to find out the age of climbing ropes?

Dukha vs legitimate need

What does "rhumatis" mean?



Chrome fails to display embedded pdf files when they are dynamically created



2019 Community Moderator ElectionProper MIME media type for PDF filesMerge / convert multiple PDF files into one PDFInserting a pdf file in latexProgrammatically download embbeded dynamic-generated PDFsCannot display HTML stringDisplay PDF in a browser Only ONCE and delete it from server C#Oracle APEX 5.0 dynamically embedding PDF into pageExtJs 6 : Embedded document Viewer to display PDF and Office documents?Embedding a PDF file in web-page: content-type octet-steamFile size issue in Chrome for base64-encoded PDF data in OBJECT tag










0















I have a page that displays embedded pdf files. Those files are served by a controller in the back end.
This page works well in Internet Explorer 11 and Edge, but in Chrome it simply returns an error saying that it failed to load the file.
In my HTML file, I used the tag like this:



<embed src='http://localhost:3000/Files/Get?id=33' width='100%' height='580' type='application/pdf'/>


It appears that if I replace the Url by a physical PDF file stored in the server, there is no issue:



<embed src='http://localhost:3000/Files/MyFile.pdf' width='100%' height='580' type='application/pdf'/>


So, the problem comes from my dynamically generated PDF file.



My server is in C# MVC:



public Task<ActionResult> Get(int id)

var file = ...search in database...
return File(file.Data, "application/pdf", file.Name);



Any idea ?










share|improve this question


























    0















    I have a page that displays embedded pdf files. Those files are served by a controller in the back end.
    This page works well in Internet Explorer 11 and Edge, but in Chrome it simply returns an error saying that it failed to load the file.
    In my HTML file, I used the tag like this:



    <embed src='http://localhost:3000/Files/Get?id=33' width='100%' height='580' type='application/pdf'/>


    It appears that if I replace the Url by a physical PDF file stored in the server, there is no issue:



    <embed src='http://localhost:3000/Files/MyFile.pdf' width='100%' height='580' type='application/pdf'/>


    So, the problem comes from my dynamically generated PDF file.



    My server is in C# MVC:



    public Task<ActionResult> Get(int id)

    var file = ...search in database...
    return File(file.Data, "application/pdf", file.Name);



    Any idea ?










    share|improve this question
























      0












      0








      0








      I have a page that displays embedded pdf files. Those files are served by a controller in the back end.
      This page works well in Internet Explorer 11 and Edge, but in Chrome it simply returns an error saying that it failed to load the file.
      In my HTML file, I used the tag like this:



      <embed src='http://localhost:3000/Files/Get?id=33' width='100%' height='580' type='application/pdf'/>


      It appears that if I replace the Url by a physical PDF file stored in the server, there is no issue:



      <embed src='http://localhost:3000/Files/MyFile.pdf' width='100%' height='580' type='application/pdf'/>


      So, the problem comes from my dynamically generated PDF file.



      My server is in C# MVC:



      public Task<ActionResult> Get(int id)

      var file = ...search in database...
      return File(file.Data, "application/pdf", file.Name);



      Any idea ?










      share|improve this question














      I have a page that displays embedded pdf files. Those files are served by a controller in the back end.
      This page works well in Internet Explorer 11 and Edge, but in Chrome it simply returns an error saying that it failed to load the file.
      In my HTML file, I used the tag like this:



      <embed src='http://localhost:3000/Files/Get?id=33' width='100%' height='580' type='application/pdf'/>


      It appears that if I replace the Url by a physical PDF file stored in the server, there is no issue:



      <embed src='http://localhost:3000/Files/MyFile.pdf' width='100%' height='580' type='application/pdf'/>


      So, the problem comes from my dynamically generated PDF file.



      My server is in C# MVC:



      public Task<ActionResult> Get(int id)

      var file = ...search in database...
      return File(file.Data, "application/pdf", file.Name);



      Any idea ?







      html google-chrome pdf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      user3099700user3099700

      214




      214






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55023312%2fchrome-fails-to-display-embedded-pdf-files-when-they-are-dynamically-created%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55023312%2fchrome-fails-to-display-embedded-pdf-files-when-they-are-dynamically-created%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme