Fix PDF receipt generation

See the commit message for more details. This should go out quickly.