How to automate PDF creation with PDF Editor