When loading a PDF document into browser, is there a way to hide the toolbar (zoom, save, print, etc.)? I've spent some time searching and even some time experimenting, but with no success.
It seems if I load a PDF into Chrome and use the developer tools, I can inspect the element and then set display: none. That does the trick there, but when I try to execute some javascript via CefSharp, it doesn't seem to have any effect.
From poking at some view source information, it looks like Chrome (the official Google version) is somehow intercepting the PDF view request and displaying the PDF in a container or frame or something of that sort that I can't directly access from operating on the main CEF frame.
Any ideas? Any help would be much appreciated. Thanks in advance!
Related
Description:
I've checked similar issues, but none of the provided solutions seem to work in this case. My assumption is that this has something to do with pdf document itself, appreciate if anyone could take a look.
Steps to reproduce
Here is the sandbox with the example
https://codesandbox.io/embed/gallant-thunder-x3o7v7?fontsize=14&hidenavigation=1&theme=dark
Expected behavior
Links are clickable. Please see the online demo https://projects.wojtekmaj.pl/react-pdf/
Actual behavior
Links are not clickable
Interesting fact, that google viewer does not open the links either (pages 4, 5), but if you download the document, links are working. I'm using default previewer on MacOS
Environment
React-PDF version: 5.7.2, same behaviour on 4.1.0
React version: 18.0.0, same on 16.4.0
Also, I used iframe and embed, and really it make link clickable but its not display pdf on safari IOS
The problem is you are using a "virtual PDF reader" (GoogleDocs/Mozilla PDF.js) which produces images and searchable text as separate layers, the link is there but it is the highlighted yellow zone not the blue underline text. also due to browser security I have to right click to open at my choice in new tab or new window (my choice would be save link as PDF for offline viewing).
In a true PDF viewer like Chrome embedded PDF Plugin or the users iFrame / offline viewer, the links would work perfectly. Again whichever way the user decides.
I keep receiving this warning when trying to click anywhere on my graph with Chrome's mobile helper turned on. Couldn't find much on Plotly's documentation for their hover events, and the I couldn't get much from the stack trace either. Any suggestions? I'm trying to be able to click on a certain data point and view its data just like you can when hovering on desktop (screenshots attached).
This looks like a bug in Plotly, the latest version that worked for me was 1.28.0. You can retrieve a specific version from the CDN:
<script src="https://cdn.plot.ly/plotly-1.28.0.min.js"></script>
I have an EXTJS app and when I look at the source by using browser's inspect element I can see my entire app's source code (except for the server-side code ofcourse.).
I have seen some extjs apps that when inspecting theie source code, all I can see is the app.html page and non of their .js files is discover able by the browser.
I was wondering how I should configure my EXTJS app to make them not viewable inside the browsers "Sources" tab (ie. Chrome's Inspect Element > Sources).
Any help is much appreciated,
The best you can do is to obfuscate your code, as there is no way to stop someone looking at it once its got to the browser.
Even if the browser could hide it somehow, there is nothing stopping a user sniffing the packets on the network etc.
We're seeing some crazy behavior using Silverlight 4 on IE, on some machines, in some configurations. Here's the scenario
1) Silverlight controls used in our own custom Sharepoint WebParts (loading using the tag)
2) 2 web-part-containing-Silverlight instances on a page. That means 2 object tags, both pointing to the same XAP file but loading different user controls from that XAP
On some pages (but not all), the Silverlight loading seems to get stuck. The Silverlight controls don't render, the object tags' onload handler isn't called, and Fiddler is showing that the XAP isn't even being downloaded. Some interaction with IE (sometimes it's hovering over the control, sometimes it's clicking on the control region) can kickstart the loading process again, and the xap will download, onload is fired, and the controls are rendered. If I let it sit for a long time (like 2-3 minutes), sometimes the loading will resume and finish (but not always).
Since it hasn't even downloaded the XAP yet, it's not something in our code - it just seems like the loading gets blocked for some reason.
This only happens on IE, not on Chrome or Firefox. We've seen it on IE8 and IE7. It doesn't happen on every page with 2 SL controls, so the page contents seems to matter. We've also seen the problem running the web parts on straight ASP.NET (outside of Sharepoint), though much less frequently.
I've tried debugging with WinDBG, and it looks like some threads are in the guts of coreclr, but there's no debug symbols so I can't deduce much.
I was using webpart for Silverlight app in SharePoint. But finally found that its not the issue with webpart. In my case I removed all webpart from the default page and finally found that SharePoint default page is not loading.. I was using IE 9.
Solution: At the end I found that it was an issue related to Active X control. So I gone to Advance tab of Internet Options and did reset/restore all settings. Then once i started browsing the default page of the SharePoint website. Then ActiveX run request pops up. I allowed the ActiveX from Microsoft Corporation. Now Sharepoint default page is loading properly..
This happened to me as well. I have multiple XAPs loaded in one page and IE (sometimes Safari) just don't do anything. Nothing gets loaded. By using the Javascript API, it waits till the document is ready before embedding the tags. This way IE can take its time processing JS, CSS, HTML, MetaTags, etc, and then silverlight loads when everything is processed.
I'm looking for something similar to the VB6 / .Net Winforms "Browser Control", that let's you show a browser inside your application.
I don't want to just render a page, I want it to be a fully-functional browser, in which people can click links, will run Javascript, etc.
In essence, what I want is an IFrame, only that it runs inside a Flash app, or a Silverlight app.
The ultimate reason for this is that I want to defeat IFrame busters. I'm making a web app that lets you see other sites inside of it, and I'm running into a bunch of sites that have this code:
var t=top.location,w=window.location;if(t!=w) t.replace(w);
(that's from eBay BTW)
which essentially pops the user out of my site and into theirs.
My hope is that by using a "browser control" of some sort, inside a plugin sandbox, "top", will be top for that browser control, and not for my site.
Of course, if you have any other ideas to achieve the same, they'll be more than welcome.
Edit: I've tried the Component One control suggested by Bill, but it didn't work for these purposes, because it's creating an IFrame outside of the SilverLight control, so it executes in the same context as the page hosting Silverlight, which is what I'm trying to avoid.
Northcode SWF Studio allows you to add browser window on the stage in Flash. I personally use SWF Studio as a third party SWF2EXE tool to extend the power of Flash projectors. It's quite stable and powerful. As far as browser control is concerned here is the example you can download and test if it serves your purpose. Check the Browser APT here.
We've not built a component to enable folks to do this but we're open to suggestions here. That being said, easiest solution is an iFrame, but word of caution in that when you overlay an iFrame over the the top of Silverlight we've seen customers experience perf issues as a result (mostly due to alpha transparency of the iframe etc).
This isn't isolated to Silverlight, Flash suffers the same issue as it has to do with browsers and rendering within the given operating system.
HTH.
Scott Barnes / Rich Platforms Product Manager / Microsoft.
I use the HTML control created by Component One. It has the limitation that the Silverlight object in the page should be set to windowless, but otherwise it works very well.
It's an old post but I'll add my tupence answer. I used the DivElements free control for Silverlight link text and it works quite nicely. It just positions the div accurately so that it looks like it's on top.
As for the other such controls, you've got to set the windowless property of the Silverlight container to true.
It works really well for me and I'm able to seemlessly have Google maps and the Acrobat plugin displayed side by side with my Silverlight application.
PS: because the component just adds a <div> to the page, you can't do stuff like having it load dynamically Javascript file like in the <header> tag.
PPS: when setting the HTML code "by hand", be sure to hook up on the DocumentReady or Loaded event before playing with the HTML DOM.
Hope that helps someone.