added pdf body serialization