javascript - generate PDF from window.print() result -


is there way , download pdf output of window.print () command.

for example:

i have button launches window.print () method, launches popup of browser print options print options, , can select pdf , generate document correctly.

what need clicking download pdf file automatically.

is there way use result of windows.print download pdf, either combining js library. on client side?

thank you.

you may try use download attribute inside <a> tag:

<a href="content/yourfile.pdf" download > pdf link of choice </a> <a href="content/yourfile.doc" download > doc link of choice  </a> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -