Manually, I would do it by
Is it possible to create a script that would skip steps 1-5?
I've searched about this topic but I can't find a definitive solution. I've read about html-to-pdf generators, but if the above steps can be done via js or something, I'd prefer that.
Thanks a lot.