Document Preview Margin/Padding Problems

Continuation of #3592