3

I need to print a pdf file directly without showing print preview. When i am using

window.print() it goes to windows print preview page. But i need to send the file directly to the printer without showing print preview page

1
  • 2
    Could you give us one solid reason why you dont want to do that ? Commented Mar 2, 2016 at 4:35

2 Answers 2

2

Thats not possible with pure javascript and html. You'll need to use silverlight 5 (Signed), flash or qz-print - js wrapper which uses java.

For i.e. specific solution following may work

javascript print without print dialog box

I have personally implemented only silverlight 5 (Signed), I have not my self implemented flash and qz-print.

Hope this helps!

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your support sir. But i need to implement above feature in PHP
Then I'll wish you luck my friend! I am 100% sure pure html and js won't cut it. You'll need to add some native component. You can write a browser add-on if its not a public site. Anyways! Best of luck my friend.
If any success on this achieve in php means please share the code, I'm looking for this code now. Please help anyone.
0

Browsers will not allow that to happen. You can use the below plugin to provide beautiful previews.

https://github.com/etimbo/jquery-print-preview-plugin

Demo: http://etimbo.github.io/jquery-print-preview-plugin/example/index.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.