Rework of pdf-reader gem for ruby motion