init_pdf: fix returing by reference