automate pdf embedding with python