mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +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:
parent
90af54acc4
commit
5f919c8d3f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user