Welcome Guest Search | Active Topics | Sign In | Register

Empty view opening PDF in EO.WebBrowser 18.* Options
Andreas
Posted: Tuesday, March 6, 2018 10:30:09 AM
Rank: Member
Groups: Member

Joined: 12/2/2015
Posts: 25
Hi

we get an empty view opening a PDF with the following code in EO.WebBrowser 18.*
var openPdf = function(pdf) {
var anchor = angular.element('<a/>');
anchor.attr({
href: 'data:application/pdf;Content-Disposition: inline;base64,' + pdf,
target: '_blank',
title: 'wuff'
})[0].click();
};

pdf: base64-encoded String

with 17.3.13 the code works fine

thanks for your support
eo_support
Posted: Tuesday, March 6, 2018 3:02:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

Please try the same code in Google Chrome browser and see if it works. EO.WebBrowser 18 uses a newer Chromium browser engine than v17 and the browser engine can work differently. If the difference in the browser engine caused this problem (in another word, if the current version of Google Chrome demonstrates the same problem), then we will not address it because we can not derivative from the "official" behavior.

If the same code works fine in Google Chrome browser, please try to isolate the problem into a small test project and send the test project to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

As soon as we receive that we will investigate further to see what triggered the new version to work differently.

Thanks!
Andreas
Posted: Thursday, March 8, 2018 3:39:11 AM
Rank: Member
Groups: Member

Joined: 12/2/2015
Posts: 25
Hi,

we tested it with the latest Google Chrome and we have the same problem.
We tested it also with an older Google Chrome and the code works fine.

On a Google-Forum I found these link: https://productforums.google.com/forum/#!topic/chrome/wvYYcBwJ9FA
it looks like this feature is disabled since Chromium V60

we tested it with the following html

<html>
<head>
<title>TEST PDF</title>
<script type="text/javascript">
function openPdf() {
document.getElementById("pdf").click();
};
</script>
</head>
<body>
<a href="javascript:openPdf();">Open PDF</a>
<a id="pdf" name="pdf" title="PDF" target="_blank" href="data:application/pdf;Content-Disposition: inline;base64,PdfAsBase64EncodedString" />
</body>
</html>

thanks for your support
eo_support
Posted: Thursday, March 8, 2018 11:18:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Thanks for sharing. In that case you would need to change your code not to rely on this feature. Generally it is not possible for us to revive a feature that was disabled by the Chromium team since first, there must have been a reason; second, it is not practical for us to produce "another browser" to behave differently than Google Chrome.

Having that said, I believe it is possible for you to use custom resource handlers to render your PDF file from memory. In fact this is how the EOPdfDemo application renders the result PDF file. You can take a look of the source code of the EOPdfDemo application and if you have any questions, please feel free to ask.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.