preporations for pdf generation