Changeset 32778
- Timestamp:
- 2019-02-15T17:05:34+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PDFv2Plugin.pm
r32499 r32778 516 516 # div that's to replace this page's <body>: 517 517 my $img_height = $dom->find('img')->[0]{height}; 518 518 # Also need to know the img width to set the surrounding div width to be no 519 # more than the img/page's screenshot width, so that the links in the GS doc 520 # view's table of contents are still at the top (z-index) and responsive. 521 my $img_width = $dom->find('img')->[0]{width}; 522 519 523 # 2. Adjust the img#background src attribute to point to the pages subdir for imgs 520 524 # 3. Set that img tag's class=background, and change its id to background+$page_num … … 542 546 # Must be: <div id="$page_num" style="position:relative; height:$img_height;"/> 543 547 # my $new_dom = Mojo::DOM->new_tag('div', id => "page".$page_num, style => "position: relative; height: ".$img_height."px;" ) 544 my $new_dom = Mojo::DOM->new_tag('div', style => "position: relative; height: ".$img_height."px; ");548 my $new_dom = Mojo::DOM->new_tag('div', style => "position: relative; height: ".$img_height."px; width: ".$img_width."px;"); 545 549 #$self->_debug_print_html($new_dom); 546 550 $new_dom->at('div')->append_content($style_element)->root;
Note:
See TracChangeset
for help on using the changeset viewer.