0

Is there any way to print a content Directly by prassing a single button without preview or print dialog box ? my code

<head>
<style type="text/css">

#printable { display: none; }

@media print
{
    #non-printable { display: none; }
    #printable { display: block; }
}
</style>
</head>
<body>
<div id="non-printable">
    MY normal page contents
</div>

<div id="printable">
    Printer version
</div>
</body>
Shawon
  • 930
  • 2
  • 10
  • 19
  • Actually, yes. Several silent printing solutions exist for the web browser, many cross-browser and cross-platform. I've provided a link to some of them in an answer below. If the question said "using pure Javascript and no plugins, no ajax back to the server, no software installed on localhost", then your answer would be correct, but the OPs question is far too generic to state "no". – tresf Mar 08 '16 at 05:54

2 Answers2

1

No, you cannot print "silently"

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
-1

A list of silent printing technologies are available here, which tend to involve cloud-enabled printers or client-side/server-side middle-ware. Alternative to Jzebra/QZ Java Raw Print Plugin after NPAPI being dropped on Chrome Browser

Community
  • 1
  • 1
tresf
  • 7,103
  • 6
  • 40
  • 101