Added gallery configuration to document
Improved document template
Fix PDF issues in documents