Use unique_ptr in PDFDocument