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
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
add a comment |
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
add a comment |
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
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
html google-chrome pdf
asked yesterday
user3099700user3099700
214
214
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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