Fix images in LRF files so that they dont autoscale and go off page

This commit is contained in:
Kovid Goyal 2007-04-22 05:51:23 +00:00
parent 6c9ea2500a
commit aa0c031886

View File

@ -31,7 +31,7 @@ from operator import itemgetter
from libprs500.lrf.html.BeautifulSoup import BeautifulSoup, Comment, Tag, \
NavigableString, Declaration
from libprs500.lrf.pylrs.pylrs import Paragraph, CR, Italic, ImageStream, TextBlock, \
ImageBlock, JumpButton, CharButton, Page
ImageBlock, JumpButton, CharButton, Page, BlockStyle
from libprs500.lrf.pylrs.pylrs import Span as _Span
from libprs500.lrf import ConversionError, option_parser, Book
from libprs500 import extract
@ -227,7 +227,8 @@ class HTMLConverter(object):
strong = {"font-weight" :"bold"},
i = {"font-style" :"italic"},
em = {"font-style" :"italic"},
small = {'font-size':'small'}
small = {'font-size' :'small'},
center = {'text-align' : 'center'}
)
processed_files = {} #: Files that have been processed
@ -427,7 +428,7 @@ class HTMLConverter(object):
page = ImagePage()
if not self.images.has_key(path):
self.images[path] = ImageStream(path)
page.append(ImageBlock(self.images[path]))
page.append(ImageBlock(self.images[path], blockStyle=BlockStyle(blockrule='block-fixed')))
self.book.append(page)
def process_children(self, ptag, pcss):