Fixed pretty print for non-HTML documents
Changes to pretty print