Typecasted PDF document generator __construct function