1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-06-30 23:49:00 +00:00

remove page_decoration

This commit is contained in:
Lu Wang 2013-11-04 23:53:38 +08:00
parent 15510af60a
commit af60845550
5 changed files with 13 additions and 31 deletions

View File

@ -72,17 +72,8 @@
* The followings are base classes, some of which are meant to be override by PDF specific classes
* So do not increase the specificity (e.g. ".classname" -> "#page-container .classname")
*/
.@CSS_PAGE_DECORATION_CN@ { /* page decoration */
position:relative;
border: 0;
overflow: hidden;
}
.@CSS_PAGE_FRAME_CN@ { /* page */
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
position:relative;
background-color:white;
overflow: hidden;
margin:0;
@ -130,7 +121,7 @@
user-select:none;
}
@media print {
.@CSS_PAGE_DECORATION_CN@ {
.@CSS_PAGE_FRAME_CN@ {
margin:0;
box-shadow:none;
page-break-after:always;
@ -138,11 +129,10 @@
}
@-moz-document url-prefix() {
/* fix page truncation for FireFox */
.@CSS_PAGE_DECORATION_CN@ {
.@CSS_PAGE_FRAME_CN@ {
overflow:visible;
border:1px solid #FFFFFF;
}
.@CSS_PAGE_FRAME_CN@ {overflow:visible;}
.@CSS_PAGE_CONTENT_BOX_CN@ {overflow:visible;}
}
}

View File

@ -62,7 +62,7 @@
-webkit-transition:left 500ms;
transition:left 500ms;
}
.@CSS_PAGE_DECORATION_CN@ {
.@CSS_PAGE_FRAME_CN@ {
margin: 13px auto;
box-shadow: 1px 1px 3px 1px #333;
/* Needed by IE to make box-shadow works * https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow */

View File

@ -45,7 +45,6 @@
*/
var CSS_CLASS_NAMES = {
page_frame : '@CSS_PAGE_FRAME_CN@',
page_decoration : '@CSS_PAGE_DECORATION_CN@',
page_content_box : '@CSS_PAGE_CONTENT_BOX_CN@',
page_data : '@CSS_PAGE_DATA_CN@',
background_image : '@CSS_BACKGROUND_IMAGE_CN@',
@ -112,8 +111,6 @@
this.n = parseInt(this.$p.data('page-no'), 16);
// content box
this.$b = $('.'+CSS_CLASS_NAMES.page_content_box, this.$p);
// decoration
this.$d = this.$p.parent('.'+CSS_CLASS_NAMES.page_decoration);
// page size
// Need to make rescale work when page_content_box is not loaded, yet
@ -171,8 +168,8 @@
else
this.hide(); // Wait for redraw
this.$d.height(this.h * this.set_r);
this.$d.width(this.w * this.set_r);
this.$p.height(this.h * this.set_r);
this.$p.width(this.w * this.set_r);
},
/* return if any part of this page is shown in the container */
is_visible : function() {
@ -333,7 +330,7 @@
// replace the old page with loaded data
// the loading indicator on this page should also be destroyed
var p = _.pages[idx];
p.$d.replaceWith(data);
p.$p.replaceWith(data);
var $new_pf = _.$container.find('#' + CSS_CLASS_NAMES.page_frame + p.n.toString(16));
p = new Page($new_pf, _.$container);

View File

@ -183,12 +183,10 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state, XRef * xref)
long long wid = all_manager.width.install(pageWidth);
long long hid = all_manager.height.install(pageHeight);
(*f_curpage)
<< "<div class=\"" << CSS::PAGE_DECORATION_CN
<< " " << CSS::WIDTH_CN << wid
<< " " << CSS::HEIGHT_CN << hid
<< "\">"
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
<< "\" class=\"" << CSS::PAGE_FRAME_CN
<< " " << CSS::WIDTH_CN << wid
<< " " << CSS::HEIGHT_CN << hid
<< "\" data-page-no=\"" << pageNum << "\">"
<< "<div class=\"" << CSS::PAGE_CONTENT_BOX_CN
<< " " << CSS::PAGE_CONTENT_BOX_CN << pageNum
@ -203,12 +201,10 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state, XRef * xref)
if(param.split_pages)
{
f_pages.fs
<< "<div class=\"" << CSS::PAGE_DECORATION_CN
<< " " << CSS::WIDTH_CN << wid
<< " " << CSS::HEIGHT_CN << hid
<< "\">"
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
<< "\" class=\"" << CSS::PAGE_FRAME_CN
<< " " << CSS::WIDTH_CN << wid
<< " " << CSS::HEIGHT_CN << hid
<< "\" data-page-no=\"" << pageNum
<< "\" data-page-url=\"";
@ -253,11 +249,11 @@ void HTMLRenderer::endPage() {
(*f_curpage) << "}'></div>";
// close page
(*f_curpage) << "</div></div>" << endl;
(*f_curpage) << "</div>" << endl;
if(param.split_pages)
{
f_pages.fs << "</div></div>" << endl;
f_pages.fs << "</div>" << endl;
}
}

View File

@ -11,7 +11,6 @@ set(CSS_LINE_CN "t") # Text
set(CSS_TRANSFORM_MATRIX_CN "m") # Matrix
set(CSS_CLIP_CN "c") # Clip
set(CSS_PAGE_DECORATION_CN "pd") # Page Decoration
set(CSS_PAGE_FRAME_CN "pf") # Page Frame
set(CSS_PAGE_CONTENT_BOX_CN "pc") # Page Content
set(CSS_PAGE_DATA_CN "pi") # Page Info