i'm developing a Ruby on Rails application and i trying to print a PDF in silent mode, in the words, after user press print dialog confirmation, the application get the default printer and send it.
One of my options, is create a Google Chrome extension, that user can manage the printer and size of paper and etc, only once. And all time that user want to print a PDF the extension send it silently to the default printer.
So, how can i do this extension?
There's any way to manage user print config with js?
There are a better way to do that?
Thanks.
Related
My object is to automatically open a URL whenever a user opens a PDF inside Adobe Acrobat. I am using PyPDF2 to inject javascript inside the PDF only once
addJS('app.launchURL(URL,true);')
It's working fine but the issue is that is am getting security warnings twice .
I want this message to appear only once but we don't recommend users to select Remember this action for the site as the URL will be dynamic for every user.
I wanted to print from the Client PC, the document is more secured which should not allow to save in the local. So I want to print directly to the default printer.
Our current problem is that in the print dialog there is an option to save the document in the local "Save as PDF". I need a solution for this:
I want to print directly in the printer without showing print dialog.
Save As PDF Dialog should not be showed in the print dialog.
For security reasons, I think you can't do this, because normally, the actions that require to store data in the disk memory without asking anything or to interface with internal or external components (except a part of RAM - in fact, for example, clipboard actions are available) are not supposed to work being forced.
I´m making a simple webapp, I want that when it is open in mobile phones print some data using the user´s wifi printer which most of cases will be an Epson L355.
Can anybody give me a clue or sample to achieve this?
Thank you all.
You won't be able to do this because you don't have access to the user's printer. Instead, you can just generate a pdf and redirect user on it.
The user will then be able to download / print the pdf via his inline PDF viewer.
You can do it by following this :
How to force files to open in browser instead of download (pdf)?
I have developed a token dispensing system (web based POS) with key component being a kiosk screen with angularjs on the client side and Java/Springs on the server side. The kiosk setup would be a normal (Win OS) Google Chrome browser window running on full screen mode, fitted with a thermal printer to print token slip.
The kiosk will dispense a token slip when the user clicks on a button (say 'Get Token') on the screen. The slip will contain a token number, a barcode and other miscellaneous info (like timestamp and kiosk id). The barcode has to be generated from the data I get from server side API call.
What I am looking for is a solution to silently (without print preview) print a token slip on the thermal printer connected to the client (kiosk) when the user clicks on a button on the kiosk screen.
Creating an iframe on-the-fly or binding values to a pre-defined html template is not helping since the data to be printed is not just plain text. It also has the barcode.
Any help would be much appreciated!!!
I haven't try completed solution as your demand, but you can try 2 separate steps below:
From server side API, you should generate an PDF for exactly
expectation print version as you want (mPDF is my best
recommendation) .
Disable print preview mode in google chrome with start up parameter "disable-print-preview"
(make your own shortcut at the desktop to run Chrome without print
preview mode. Then using javascript to do the print like you did
with iframe or new window.
PS: a good tip for a shortcut from techlogon: http://techlogon.com/2012/03/29/how-to-disable-print-preview-in-chrome/
I want to send a html text request to printer using PHP.
What I did was
window.print()
in JS, which is showing me a print dialog box, which is something I don't need. I
have used browser config:
firefox always_print_silent
I want to send the print command without changing the config on the client. I need a solution for any popup or dialog box and one that will work on any browser.
If anyone has a solution for this please reply.
If a web page could just send something to the printer without the user confirming it in some way, we'd have a wave of nasty spam and jokers that would print NSFW pictures until you run out of paper. I think we all agree that would be bad. So no, you cannot have a web page print without the browser showing a dialog box… unless the user knows what (s)he is doing and is explicitly disabling that like with the always_print_silent option.