init_pdf: proper way returing by reference