Document Preview Margin/Padding Problems

Continuation of #3592
Could the `pageNumber` be made optional?