Fix img layout bug
This commit is contained in:
@@ -397,6 +397,16 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
LOG_DBG("EHP", "Display size: %dx%d (scale %.2f)", displayWidth, displayHeight, scale);
|
LOG_DBG("EHP", "Display size: %dx%d (scale %.2f)", displayWidth, displayHeight, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flush any pending text block so it appears before the image
|
||||||
|
if (self->partWordBufferIndex > 0) {
|
||||||
|
self->flushPartWordBuffer();
|
||||||
|
}
|
||||||
|
if (self->currentTextBlock && !self->currentTextBlock->isEmpty()) {
|
||||||
|
self->makePages();
|
||||||
|
self->currentTextBlock.reset();
|
||||||
|
self->wordsExtractedInBlock = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Create page for image - only break if image won't fit remaining space
|
// Create page for image - only break if image won't fit remaining space
|
||||||
if (self->currentPage && !self->currentPage->elements.empty() &&
|
if (self->currentPage && !self->currentPage->elements.empty() &&
|
||||||
(self->currentPageNextY + displayHeight > self->viewportHeight)) {
|
(self->currentPageNextY + displayHeight > self->viewportHeight)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user