MT#5879 Use total from pages
MT#5879 Put PDF to DB.