Feature/setapdf update

Added PDF lib; fix and refactor PDF creation;