1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-02 16:25:41 +00:00

Fix problem with certain pdfs that transform the entire document upside

down, including the fonts, which normally appear correctly in other
renderers. Since CSS doesn't know how to handle negative font sizes, the
document needs to be transformed correctly.
This commit is contained in:
Herbert Jones 2012-12-05 16:10:22 -06:00
parent 90af54acc4
commit 5f919c8d3f

View File

@ -161,6 +161,15 @@ void HTMLRenderer::check_state_change(GfxState * state)
new_draw_text_scale = 1.0;
}
if(!_is_positive(new_draw_font_size))
{
// Page is flipped and css can't handle it.
new_draw_font_size = -new_draw_font_size;
for(int i = 0; i < 4; ++i)
new_draw_text_tm[i] *= -1;
}
if(!(_equal(new_draw_text_scale, draw_text_scale)))
{
draw_text_scale_changed = true;