diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-08-01 14:19:20 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-08-09 14:02:19 +0200 |
commit | a8d0c8aaea42eb81332d956eb1ec4883d44bb369 (patch) | |
tree | 8f26076ff8e44f6210532cd3ebf853f3e7a22061 | |
parent | a644f7e67af05dca8601e379442690c724030738 (diff) | |
download | mupdf-a8d0c8aaea42eb81332d956eb1ec4883d44bb369.tar.xz |
Put XHTML images inside a <p> tag (make them block level).
-rw-r--r-- | source/fitz/stext-output.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/fitz/stext-output.c b/source/fitz/stext-output.c index 83018c3c..63124aa7 100644 --- a/source/fitz/stext-output.c +++ b/source/fitz/stext-output.c @@ -182,9 +182,9 @@ fz_print_stext_image_as_xhtml(fz_context *ctx, fz_output *out, fz_image_block *b int w = block->bbox.x1 - block->bbox.x0; int h = block->bbox.y1 - block->bbox.y0; - fz_write_printf(ctx, out, "<img width=\"%d\" height=\"%d\" src=\"data:", w, h); + fz_write_printf(ctx, out, "<p><img width=\"%d\" height=\"%d\" src=\"data:", w, h); fz_write_image_as_data_uri(ctx, out, block->image); - fz_write_string(ctx, out, "\"/>\n"); + fz_write_string(ctx, out, "\"/></p>\n"); } static void @@ -311,7 +311,6 @@ fz_print_stext_header_as_xhtml(fz_context *ctx, fz_output *out) fz_write_string(ctx, out, "<style>\n"); fz_write_string(ctx, out, "body{background-color:gray}\n"); fz_write_string(ctx, out, "div{background-color:white;margin:1em;padding:1em}\n"); - fz_write_string(ctx, out, "p{margin:0 0 1em 0}\n"); fz_write_string(ctx, out, "</style>\n"); fz_write_string(ctx, out, "</head>\n"); fz_write_string(ctx, out, "<body>\n"); |