Similar comment to the `buildDocument` method.