mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
remove page_decoration
This commit is contained in:
parent
15510af60a
commit
af60845550
@ -72,17 +72,8 @@
|
|||||||
* The followings are base classes, some of which are meant to be override by PDF specific classes
|
* 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")
|
* 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 */
|
.@CSS_PAGE_FRAME_CN@ { /* page */
|
||||||
position:absolute;
|
position:relative;
|
||||||
top:0;
|
|
||||||
left:0;
|
|
||||||
width:100%;
|
|
||||||
height:100%;
|
|
||||||
background-color:white;
|
background-color:white;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin:0;
|
margin:0;
|
||||||
@ -130,7 +121,7 @@
|
|||||||
user-select:none;
|
user-select:none;
|
||||||
}
|
}
|
||||||
@media print {
|
@media print {
|
||||||
.@CSS_PAGE_DECORATION_CN@ {
|
.@CSS_PAGE_FRAME_CN@ {
|
||||||
margin:0;
|
margin:0;
|
||||||
box-shadow:none;
|
box-shadow:none;
|
||||||
page-break-after:always;
|
page-break-after:always;
|
||||||
@ -138,11 +129,10 @@
|
|||||||
}
|
}
|
||||||
@-moz-document url-prefix() {
|
@-moz-document url-prefix() {
|
||||||
/* fix page truncation for FireFox */
|
/* fix page truncation for FireFox */
|
||||||
.@CSS_PAGE_DECORATION_CN@ {
|
.@CSS_PAGE_FRAME_CN@ {
|
||||||
overflow:visible;
|
overflow:visible;
|
||||||
border:1px solid #FFFFFF;
|
border:1px solid #FFFFFF;
|
||||||
}
|
}
|
||||||
.@CSS_PAGE_FRAME_CN@ {overflow:visible;}
|
|
||||||
.@CSS_PAGE_CONTENT_BOX_CN@ {overflow:visible;}
|
.@CSS_PAGE_CONTENT_BOX_CN@ {overflow:visible;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
-webkit-transition:left 500ms;
|
-webkit-transition:left 500ms;
|
||||||
transition:left 500ms;
|
transition:left 500ms;
|
||||||
}
|
}
|
||||||
.@CSS_PAGE_DECORATION_CN@ {
|
.@CSS_PAGE_FRAME_CN@ {
|
||||||
margin: 13px auto;
|
margin: 13px auto;
|
||||||
box-shadow: 1px 1px 3px 1px #333;
|
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 */
|
/* Needed by IE to make box-shadow works * https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow */
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
*/
|
*/
|
||||||
var CSS_CLASS_NAMES = {
|
var CSS_CLASS_NAMES = {
|
||||||
page_frame : '@CSS_PAGE_FRAME_CN@',
|
page_frame : '@CSS_PAGE_FRAME_CN@',
|
||||||
page_decoration : '@CSS_PAGE_DECORATION_CN@',
|
|
||||||
page_content_box : '@CSS_PAGE_CONTENT_BOX_CN@',
|
page_content_box : '@CSS_PAGE_CONTENT_BOX_CN@',
|
||||||
page_data : '@CSS_PAGE_DATA_CN@',
|
page_data : '@CSS_PAGE_DATA_CN@',
|
||||||
background_image : '@CSS_BACKGROUND_IMAGE_CN@',
|
background_image : '@CSS_BACKGROUND_IMAGE_CN@',
|
||||||
@ -112,8 +111,6 @@
|
|||||||
this.n = parseInt(this.$p.data('page-no'), 16);
|
this.n = parseInt(this.$p.data('page-no'), 16);
|
||||||
// content box
|
// content box
|
||||||
this.$b = $('.'+CSS_CLASS_NAMES.page_content_box, this.$p);
|
this.$b = $('.'+CSS_CLASS_NAMES.page_content_box, this.$p);
|
||||||
// decoration
|
|
||||||
this.$d = this.$p.parent('.'+CSS_CLASS_NAMES.page_decoration);
|
|
||||||
|
|
||||||
// page size
|
// page size
|
||||||
// Need to make rescale work when page_content_box is not loaded, yet
|
// Need to make rescale work when page_content_box is not loaded, yet
|
||||||
@ -171,8 +168,8 @@
|
|||||||
else
|
else
|
||||||
this.hide(); // Wait for redraw
|
this.hide(); // Wait for redraw
|
||||||
|
|
||||||
this.$d.height(this.h * this.set_r);
|
this.$p.height(this.h * this.set_r);
|
||||||
this.$d.width(this.w * this.set_r);
|
this.$p.width(this.w * this.set_r);
|
||||||
},
|
},
|
||||||
/* return if any part of this page is shown in the container */
|
/* return if any part of this page is shown in the container */
|
||||||
is_visible : function() {
|
is_visible : function() {
|
||||||
@ -333,7 +330,7 @@
|
|||||||
// replace the old page with loaded data
|
// replace the old page with loaded data
|
||||||
// the loading indicator on this page should also be destroyed
|
// the loading indicator on this page should also be destroyed
|
||||||
var p = _.pages[idx];
|
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));
|
var $new_pf = _.$container.find('#' + CSS_CLASS_NAMES.page_frame + p.n.toString(16));
|
||||||
p = new Page($new_pf, _.$container);
|
p = new Page($new_pf, _.$container);
|
||||||
|
@ -183,12 +183,10 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state, XRef * xref)
|
|||||||
long long wid = all_manager.width.install(pageWidth);
|
long long wid = all_manager.width.install(pageWidth);
|
||||||
long long hid = all_manager.height.install(pageHeight);
|
long long hid = all_manager.height.install(pageHeight);
|
||||||
(*f_curpage)
|
(*f_curpage)
|
||||||
<< "<div class=\"" << CSS::PAGE_DECORATION_CN
|
|
||||||
<< " " << CSS::WIDTH_CN << wid
|
|
||||||
<< " " << CSS::HEIGHT_CN << hid
|
|
||||||
<< "\">"
|
|
||||||
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
|
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
|
||||||
<< "\" class=\"" << CSS::PAGE_FRAME_CN
|
<< "\" class=\"" << CSS::PAGE_FRAME_CN
|
||||||
|
<< " " << CSS::WIDTH_CN << wid
|
||||||
|
<< " " << CSS::HEIGHT_CN << hid
|
||||||
<< "\" data-page-no=\"" << pageNum << "\">"
|
<< "\" data-page-no=\"" << pageNum << "\">"
|
||||||
<< "<div class=\"" << CSS::PAGE_CONTENT_BOX_CN
|
<< "<div class=\"" << CSS::PAGE_CONTENT_BOX_CN
|
||||||
<< " " << CSS::PAGE_CONTENT_BOX_CN << pageNum
|
<< " " << CSS::PAGE_CONTENT_BOX_CN << pageNum
|
||||||
@ -203,12 +201,10 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state, XRef * xref)
|
|||||||
if(param.split_pages)
|
if(param.split_pages)
|
||||||
{
|
{
|
||||||
f_pages.fs
|
f_pages.fs
|
||||||
<< "<div class=\"" << CSS::PAGE_DECORATION_CN
|
|
||||||
<< " " << CSS::WIDTH_CN << wid
|
|
||||||
<< " " << CSS::HEIGHT_CN << hid
|
|
||||||
<< "\">"
|
|
||||||
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
|
<< "<div id=\"" << CSS::PAGE_FRAME_CN << pageNum
|
||||||
<< "\" class=\"" << CSS::PAGE_FRAME_CN
|
<< "\" class=\"" << CSS::PAGE_FRAME_CN
|
||||||
|
<< " " << CSS::WIDTH_CN << wid
|
||||||
|
<< " " << CSS::HEIGHT_CN << hid
|
||||||
<< "\" data-page-no=\"" << pageNum
|
<< "\" data-page-no=\"" << pageNum
|
||||||
<< "\" data-page-url=\"";
|
<< "\" data-page-url=\"";
|
||||||
|
|
||||||
@ -253,11 +249,11 @@ void HTMLRenderer::endPage() {
|
|||||||
(*f_curpage) << "}'></div>";
|
(*f_curpage) << "}'></div>";
|
||||||
|
|
||||||
// close page
|
// close page
|
||||||
(*f_curpage) << "</div></div>" << endl;
|
(*f_curpage) << "</div>" << endl;
|
||||||
|
|
||||||
if(param.split_pages)
|
if(param.split_pages)
|
||||||
{
|
{
|
||||||
f_pages.fs << "</div></div>" << endl;
|
f_pages.fs << "</div>" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ set(CSS_LINE_CN "t") # Text
|
|||||||
set(CSS_TRANSFORM_MATRIX_CN "m") # Matrix
|
set(CSS_TRANSFORM_MATRIX_CN "m") # Matrix
|
||||||
set(CSS_CLIP_CN "c") # Clip
|
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_FRAME_CN "pf") # Page Frame
|
||||||
set(CSS_PAGE_CONTENT_BOX_CN "pc") # Page Content
|
set(CSS_PAGE_CONTENT_BOX_CN "pc") # Page Content
|
||||||
set(CSS_PAGE_DATA_CN "pi") # Page Info
|
set(CSS_PAGE_DATA_CN "pi") # Page Info
|
||||||
|
Loading…
Reference in New Issue
Block a user