I am trying to follow along with
What am I doing wrong?
CodePudding user response:
iframe height only allows height=pixels so 100%=minimum (default=150)
But simplest is decide a desired height.
Workarounds may not work well based on user settings
CodePudding user response:
Probably just invalid or at least not well-formatted HTML
string. I'd suggest using the XElement
syntax to build the HTML
output, it helps to write the tags and attributes correctly...
Dim pdfBytes = 'The PDF byte array...
Dim pdfBase64 = Convert.ToBase64String(pdfBytes)
Dim html =
<html>
<body>
<iframe
width="100%"
height="100%"
src=<%= String.Concat("data:application/pdf;base64,", pdfBase64) %>>
</iframe>
</body>
</html>.ToString()
WebView21.NavigateToString(html)
Nice VB.NET
feature.
CodePudding user response:
can you try height="auto"; what is your parent div's height?