Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
If you print a page it gives you chance to download as pdf, can I make somehow automatically a button when i click it to open print and download as PDF
You can't.
Save as PDF is part of your OS/Environment and depends from what APP you have installed (some are native, some are not).
Javascript of your webpage cannot request or access to resource that cannot be available on your OS/Environment, can only access to your browser functions.
Your OS execute the browser APP that execute javascript script on your webpage.
Browser can access to printers but javascript cannot (mainly because it's designed to be like this).
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm rendering one PDF in my website using the Canvas so that the user can view but not download. I have disabled the right click and the disable the download button and disable the printout too on any of the browsers. However there are still ways to get into the F12 mode and get the PDF downloaded. IF any one can help to achieve my logic to disable the developer mode on that particular webpage.
Thanks in advance.
Even if you could, it won't matter.
The pdf document data, unless generated by your client, has been downloaded, which means even if a website had control over a client's dev tools (which it does not), the client could just intercept all the packages containing your file going to his machine.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to do some image processing on a browser where I upload images and with my python script, it manipulates the images. In the end, I just want to open an HTML page where I can simply use buttons there to process my python script. Please tell me how can I do it? I don't know much about web development. I don't need to host a website. I just want to do it locally so that if I give my files to anyone they can access it by just opening the HTML document.
If you want to practice and you need to upload an image and processing in your web app you need to use Phyton(with Django should be more fast to create what you want) and MySQL(or another database) to save the data.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
As the title,not only in IE.
If js can not do this,is there other way to do this?
It's best to show a demo code.
This cannot be done with Javascript. Browsers are deliberately isolated from the host machine to prevent malicious behaviour. So the amount of access to local resources is extremely limited (eg. uploading a file) and can only be initiated by the user.
In the past, you could have used ActiveX controls or Java applets to perform these types of actions, but Oracle has discontinued its browser plugin for applets and ActiveX controls do not run on all browsers.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a Windows Store application, which I wrote in TypeScript. What are the ways for me to read/write files in the device File System or in device Event Log in TypeScript?
Yu cannot get arbitrary file system access as you are sandboxed in windows store apps for user safety.
To get access to your storage look at http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.storage.applicationdata.localsettings and http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.storage.applicationdata.localfolder.aspx
Every JavaScript api applies to TypeScript.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Imagine a website - for example YouTube. In every video I'd like to insert a link next to the title that will point to my website, and if I click it, it grabs the url and sends it to my site's database.
I've seen somewhere such a possibility (I don't remember where), consisted of the fact that you dragged a *.js file onto your browser window and it worked locally just for you in the browser like an extension to existing site or sth.
Can you point me to articles or other resources if this is possible?
You have a couple options:
You can use a browser extension such as Greasemonkey for Firefox, or Tampermonkey for Chrome.
Write a Bookmarklet.