write json from pdf
create CAP_OFFSET