Replace PDF by document because it's not always a PDF

Fix #735