There were some "minor" changes from 4.51 to 5.x, being the major one the condensation of all the modules into one B4XLib, which if you need to, you can rename to .zip and extract all the code modules that are inside..
Also, v5.x has got some methods and/or properties altered, which may break some code based on previous versions.
My suggestion to you is, if you need to, rename the .B4XLib to .zip, and extract/remplace the v4.51 modules, keeping the same structure, specially the www (update it if needed).
This will give you the "full" framework version exposing all the modules so that you can change relevant code as you see fit.
Then, if you still have trouble, create a new thread with the prefix [ABMaterial] (this will get
@alwaysbusy attention, and if you think you need him, then just use @ to mention him), and in this new thread, give as much info as you can, including relevant code, properly enclosed with the </> tags.
|EDIT] - I just realized that the PrintToPDF, as well as a few other additions are exclusively for donators as you can see in the .Initialize method, it expects a donatorkey, that is given out by Alain when you donate.