We have web application, it contains iframe with src attribute linking some pdf resource. In browsers (Edge, Chrome, Opera) user can see pdf in this iframe.
But now we createed UWP application showing the same html pages. When user open the page with this iframe, iframe is empty and the pdf is automaticaly opened in the browser window.
How to enable support for pdf in iframe in UWP application?
If I understand your question, you want to use WebView to show a web page. The web page has a <iframe> html tag, the iframe's src is a online pdf file. For the UWP built-in WebView control, it doesn't support pdf file.
So, if you want to render pdf in UWP, you could use Windows.Data.Pdf classes.
In addition, if you say you have to use WebView to show pdf file, you could try to find some JavaScript ways to render the pdf file on web page and then show it in WebView.
Related
I tried to download the web page as pdf by using html2canvas and jspdf. All elements of page like radio button, checkbox and label are rendered well. But if I add the embedded video into the page by iframe, it doesn't render at all.
Is there any way to render the embedded video into pdf by html2canvas and jspdf?
Thanks.
this is the screenshot of web page to be rendered.
And this is one of downloaded pdf.
I'm afraid html2canvas cannot render iframes. It says so clearly in the documentation:
The script doesn't render plugin content such as Flash or Java applets. It doesn't render iframe content either.
You could do this by other means, but not from the client, AFAIK.
I have an online tool for users to build and preview slideshow presentations (uploading images, editing text).
Would there be a way to "export" the content of a rendered slideshow for offline use? This would mean the user could view the presentation locally in a browser using only static files.
Use
var myRenderedHTML = Blaze.toHTMLWithData(templateYouWantToCache, dataUsedToRenderTemplate);
Then use something like the Filesaver.js library to force download of that content as an HTML file. (as in the last demo on this page)
I am currently using Durandal 2.0 to produce a modal dialog box to display an HTML file. I am successfully doing it using IFRAME tag. Its needed for the application. SSRS produces these files daily and the user needs to see the content of these files on an intranet app. I was wondering is there a more preferred way of displaying the content of an external HTML file other than using IFRAME tags or is IFRAME tags are still the preferred way?
Thanks in advance for the answers.
If your HTML views has nothing to do with your view models then I think there is no point of making that HTML files to a Durandal view.
Because the actions/navigations happening in those HTML files are independent from your Durandal application it is better to use an IFrame.
I'm loading pdf's into an iframe on my web page by setting the src of the iframe to the path of the pdf document.
This works as I'd like for viewing the pdf.
The problem is that some of the pdf's have hyperlinks in them to external websites which, when clicked, load the external website in my iframe.
So my question is: is it possible to catch the pdf's hyperlink click in javascript in the parent browser window, set the target to either top or blank and then redirect the request?
Unfortunately the pdf's are supplied by a third party so I don't have access to change the documents themselves.
Some ideas:
You can try hooking into the iframe's load/readystatechange event to catch when the iframe is loading another url.
You can "poll" the iframe every n interval and compare the src attribute to the URL of the pdf.
After you catch the change, you can redirect and open a window with the proper url. But browsers may block the JS pop-up window.
In a Silverlight web application I have created PDF using PDFsharp’s silverPDF.dll. Within that PDF I have added some active links. I want links within PDF on click it opens new browser window.
Thanks in advance.
In PDFsharp you add web links using
PdfPage.AddWebLink Method
You cannot specify the target.