chages to work with PSPDFKit 4.0
some changes for pspdfkit 4.0