Use common variable body processing in PDF and rest #1188