|
@@ -229,6 +229,7 @@ class view_path(Load):
|
|
|
uid = self.input('uid')
|
|
|
page = self.input('page')
|
|
|
path = self.input('path')
|
|
|
+ host = self.input('host')
|
|
|
|
|
|
self.data = {}
|
|
|
Common.signature(self)
|
|
@@ -270,8 +271,13 @@ class view_path(Load):
|
|
|
content = content.replace('data-page-url="', 'data-page-url="' + url)
|
|
|
|
|
|
script = '<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>'
|
|
|
- script = script + '<script>document.domain="192.168.33.10";$(function(){parent.setHeight($(document.body).height());})</script>'
|
|
|
+ script = script + '<script>document.domain="'+host+'";$(function(){var e = pdf2htmlEX.defaultViewer;var height = e.container.clientHeight;for(var i in e.pages){height = height + e.pages[i].original_height};parent.setHeight(height)})</script>'
|
|
|
content = content.replace('</body>', script + '</body>')
|
|
|
+
|
|
|
+ style = '<style>#page-container{background-color: white;background-image: none;}#sidebar{background-color: white;background-image: none;}.pf{border:1px solid #bababa;box-shadow:none}</style>'
|
|
|
+
|
|
|
+ content = content.replace('</head>', style + '<head>')
|
|
|
+
|
|
|
self.write(content)
|
|
|
|
|
|
# 下载源文件
|