Domanda

I am trying to create an application (jQuery or JavaScript) that will print 100 unique invoices with 1 click of a print button without calling the print dialog box.

Requirement is that I don't want to allow website users to access soft copies of their invoices. Problem is that the JavaScript print command window.print opens a dialog box for each invoice and in my case it will ask 100 times to print next invoice.

Any help will be highly appreciated, thanks in advance!

È stato utile?

Soluzione

You can't bypass the print dialog box, but you can generate all your invoices before triggering print dialog

Altri suggerimenti

If it is displayed on screen at any time, the user can print screen it. Disabling print screen won't work since you can do screen-capture with hardware, or even simply a camera phone.

If it is not displayed on the screen, then it must be in the client's machine's memory, if they really want to, they can still extract it. Simplest case maybe just adding a breakpoint in the javascript or opening up the source.

If the document to be printed is not stored in the machine, then what are you asking for is really to let your server to control what exactly does the user's printer prints without confirmation. I don't think it is possible.

Moreover after the users have printed it, they can still scan it back as a pdf, or even OCR it to get .doc or text.

I wonder what makes you want to prevent the user obtaining a soft copy.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top