start of better use of poppler cpp api. unfinished