update, i got it to work on my linux, so i noticed what was giving me cors errors on windows was that idm would catch the pdf first before the pdf was actually displayed, afetr disabling idm now there is no more cors issues, and also i manged to fix the "NaN" issue i was facing when it comes to displaying pdf size, it was just a simple thing hich made me rage out for not seeing it, in the document code where size is i just replaced with sizes and it now works fine....am currently battling with the payment gateway since stripe is not available where i am from