Its look weird but i am not getting where is the documentation of google docs viewer to embed in my website. https://docs.google.com/viewer here is link where I can only generate links. Actually i want to increase or remove the timeout check because i cant view files with big sizes. Here is what i am doing right now
<iframe id="iframe1" src="www.urltopdf.pdf&embedded=true"width="1000" height="800" ></iframe>
and with big files getting following error.
Sorry, it took too long to find the document at the original source. Please try again later.
You can also try to download the original document by clicking here.
Here is a page with a form that generate a link to the document viewer : https://docs.google.com/gview
[EDIT] Google may have deprecated this functionnality.
In this page, there is a very minimal documentation that you may already have seen, but I didn't find any other documentation about it, and the search "gview" gave 0 result in developers.google.com.
There are also other similar issues about Joomla or Wordpress plugins using this viewer.
As an alternative to this viewer, if you host these files in Google Drive, you can use the google drive's built-in preview functionnality :
<iframe src="https://docs.google.com/file/d/fileID/preview" width="640" height="480"></iframe>
You can easily access to this from any previewed document from Google Drive by clicking on ⋮ then integrate element.
Related
I'm trying to develop a chrome extension and I want to mimic how browsers are able to grab a screenshot or logo of a website by only its link. You usually see it when you open a new tab. I'm using json, javascript, css and html.
Below is the examples of those.
(https://i.stack.imgur.com/upxrr.png)(https://i.stack.imgur.com/KKMpb.png)
I've tried to search for within the Chrome API Documentation, but I couldn't find anything on it. I've also tried to use iFrames, but they are extremely insufficient and they don't resize well on a smaller display.
Do you have an specific use case for that?, if not i think you could save a lot of time implementing it yourself.
You could import a custom png or svg file and wrap it with a tag
<a href="link">
<img src={yourImgSrc} width={} height={}></img>
</a>
I'm going to write a site that lets users to view pdf files but I don't want them to save the files to their own hard drive due to the copy right law. I'm researching how to view it by using PHP, but I have no idea how to disable user not to download the files.
Actually, I want to use JavaScript to disable this action, but I get suggestions from other people not to do so because it's annoying to user.
So any suggestion or help would be very much appreciated.
USE CSS opacity: 1.0 with a <div> positioned over your content...
You could output the pdf using <object> or <iframe>, then place a with absolute position and use z-index to cover your pdf. Use the css opacity: 1.0.
Now when users try to click or copy, they get nothing because they are really clicking on a blank <div>!!!!
Its a hack, but it works! The user will be able to read the content, they could take a screen shot, but they won't be able to actually copy the text and paste it anywhere.
Method 01
Implementing that useing Google books
<iframe frameborder="0" scrolling="no" style="border:0px" src="https://books.google.com.kh/books?id=e5MkzETNcsgC&lpg=PP1&dq=typography&pg=PA11&output=embed" width="500" height=500>
</iframe>
In above image it shows Embed that will be the code. And Download or Print option is not available on this. Google dosc can prevent download but its allow to Save to Drive option. Then in drive i can download it. But Google books not allow any of that.
in view
Method 02
Using Google Drive
Right click on pdf and goto Share(below image)
Then go to Advanced option in left bottom
Tick Both check boxes. After copy embed link and paste it to your src. No download and Save drive option is not allowed
Note: Method 01 and Method 02 is Tested
You can't prevent your visitors from downloading, copying or scrapping anything you're outputting to their browsers. If they can view it they can always screenshot it. Which brings in the optimal solution to your problem: Simply offer image copies of your documents instead of actual PDF files. You can convert / mass convert PDF files to JPEG easily with Photoshop.
I hope I am not very late to reply. But here's is something you can do to prevent the users. Use iFrame to display your PDF and make sure that you are displaying using Google. I used the following code :
<iframe src="http://docs.google.com/gview?url=http://www.tutorialspoint.com/php/php_tutorial.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0">
</iframe>
Here you can simply change the url=http://www.tutorialspoint.com/php/php_tutorial.pdf and replace it by your own URL where you kept your PDF.
Try this one:
<iframe src="test1.pdf" scrolling="no" frameborder="0" height="100%" width="100%" style="position:absolute; clip:rect (190px,1100px,800px,250px);">
try this
<embed src="http://URL_TO_PDF.com/pdf.pdf#toolbar=0&navpanes=0&scrollbar=0" width="500" height="500">
I am desperatly trying to put online a map I created through a Javascript code on a html page (I'm not a professional developper, and I am particulary ignorant in javascript). As long as I keep the html file local, everything runs ok, but as soon as I put it online, the map won't show, and I got a message concerning the missing key.
So I got a key, but my problem is to find how it works. My map is generated by the following instruction :
map = new google.maps.Map(document.getElementById("map"), options);
I tried to add this script :
script src="https://maps.googleapis.com/maps/api/js?key=#####&callback=initMap" async defer
But all that happens is several more errors, and no map visible.
Could anyone help me ? Thanks in advance
Instead, you should use an iframe that you get on the google maps site. Example:
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d100994.00356082054!2d-121.9805740058651!3d37.71820818113972!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x808fe65cd6892231%3A0x3b327c848ef64057!2sDublin%2C+CA+94568!5e0!3m2!1sen!2sus!4v1480970198759" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
Go to credentials page in google developer console then at the top you will see Domain Verification tab click on that tab, then click on the button Add domain in order to add the domain from where your site is being loaded.
If you do this you will not need API key. Thanks to this Google can track your requests.
Important Note
I'm not sure whether this will be the case for you but please note that once you will add a verified domain make sure that the previously generated your key is not being used for the Google Map's web services like APIs otherwise that APIs will return error after adding domain.
I am currently working on http://rightinfo.co.in
When I am trying to share this site on a FB page it is showing an image that I have not included in my site.
I have tried by adding ?v=1 to the url and url shortner services.
In facebook debugger also , the image is not showing. But in actual sharing , unknown image is showing.
Please help me to solve this
Thanks
You have issue with tags Please check this facebook debugger it explains alot Facebook debugger
It's because the og:image (see here) meta tag is set. This tag defines the image, which will be shown on facebook.
To change this image, try to edit this tag, take a look at the theme settings.
Another way is to change/delete the image itself, e.g. via FTP.
You can find it here: WEBROOT/wp-content/themes/Morpheus/img/portfolio/folio01-preview.jpg
Btw, I see you are using wordpress, I'd consider using a SEO plugin, which makes a proper use of the og-tags as explained here
We are a little stuck however on the following embedded flash image:
[kml_flashembed movie="http://www.griffintaxfree.com/images/logos/stacklogos.swf" height="250" width="500" /]
I need to know how to open up this, change the images within it, and then re-post it to our web page.
It was created by someone who no-longer handles our site.
You need a Flash Decompiler. Once the program is compiled to SWF it is very difficult to extract what's inside.
If you can get the program to display the image it's probably easier to take a screenshot.
Downloading the file...
If you can navigate directly to the URL (your case):
Use the Save Page As... feature, typically under File, or Page Settings in most browsers
If it is embedded within a page:
You can usually navigate to the file itself, by looking at the available items on the page, such as using the following in Firefox:
Tools => Page Info => Media => Find the flash file => Save As...
or by scouring through the source and finding a link to the file itself and saving it.
Editing the file...
The editing process however, can be much more difficult, especially if you don't have anyone with experience working with Flash. You will need a Flash Decompiler to make the file editable.