Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

Client Side Print without Pop-up

Open arunraman05 opened this issue 10 years ago • 6 comments

I have loaded the analytics.js, print.js and print.css Click the button , i just call the method printJS('docs/PrintJS.pdf')

It will download the PDF. I need to print the PDF file without opening the file. Kindly guide me.

arunraman05 avatar Jun 28 '16 11:06 arunraman05

What browser are you using? Does the something happen when you use a different browser?

crabbly avatar Jun 28 '16 13:06 crabbly

@arunraman05 I can't replicate this issue. Are you still having problems?

crabbly avatar Jun 30 '16 00:06 crabbly

I have using chrome browser, issue is still remains. I have checked with IE same problem. Kindly instruct step to follow

On Thu, Jun 30, 2016 at 5:42 AM, Rodrigo Vieira [email protected] wrote:

@arunraman05 https://github.com/arunraman05 I can't replicate this issue. Are you still having problems with it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/crabbly/Print.js/issues/1#issuecomment-229526183, or mute the thread https://github.com/notifications/unsubscribe/AP7KN_Zft8sbXYKoWG50ZrucdzA6eW68ks5qQwnlgaJpZM4JAA8G .

Regards, ArunRaman 9500136681

arunraman05 avatar Jun 30 '16 08:06 arunraman05

@arunraman05 I couldn't replicate this issue. The library works well with Chrome and IE. Could you please post more info on how you are calling printJS('docs/PrintJS.pdf')? Your HTML button, link, or whatever you are using it to allow the user to click / print.

crabbly avatar Jul 06 '16 14:07 crabbly

i Just add lib in html page

and locate the pdf file in project.

while clicking the button , print preview is open. I need to print directly without preview to the default printer. Kindly suggest as.

On Wed, Jul 6, 2016 at 8:21 PM, Rodrigo Vieira [email protected] wrote:

@arunraman05 https://github.com/arunraman05 I couldn't replicate this issue. The library works well with Chrome and IE. Could you please post more info on how you are calling printJS('docs/PrintJS.pdf')? Your HTML button, link, or whatever you are using it to allow the user to click / print.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/crabbly/Print.js/issues/1#issuecomment-230796310, or mute the thread https://github.com/notifications/unsubscribe/AP7KN2P7RIuqXr2i7VbtguoU27QmX866ks5qS8DfgaJpZM4JAA8G .

Regards, ArunRaman 9500136681

arunraman05 avatar Jul 07 '16 06:07 arunraman05

@arunraman05 oh... I understand what you are saying now. You are talking about the browser print dialog, which in case of google chrome for example, you get a preview of the document.

This is not possible with pure javascript, for security reasons. Imagine a malicious code sending lots of print jobs to your printer directly, that wouldn't be fun.

As far as I know, you would need to use ActiveX to accomplish that, which would be limited to IE.

PrintJS helps by removing an extra step, which would be opening the PDF file first, then requiring the user to click print from the document view. Using the library, you can open the browser's print dialog directly without opening the document itself.

crabbly avatar Jul 07 '16 06:07 crabbly