Bug report #11648

Problems with sizes and letter-spacing in HTML-frames

Added by Albert van de Maat over 9 years ago. Updated almost 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:3.7(master) Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19901

Description

When using HTML-frames in composer, there are several problems:
  1. When exporting to pdf, letter-spacing in this pdf is wrong (text appears too dense). Letter-spacing appears alright in composer.
  2. Sizes (CSS-styles), for example the width/height of a table or div, appear approximately 10% to small, both in composer and when exported to pdf.
  3. Borders (CSS-styles) less than 0.27mm do not appear, both in composer and when exported to pdf.
As an alternative i tried the same HTML-code in a label (rendered as HTML).
  1. This has no problem with letter-spacing in pdf export.
  2. It has the same problems with sizes, everything is about 10% too small.
  3. Borders less than 0.27mm are possible.
    So this method is less bugged.

Bug-report-11648.qgs (6.02 KB) Albert van de Maat, 2014-11-15 11:28 PM

Test.html Magnifier (281 Bytes) Albert van de Maat, 2014-11-15 11:28 PM

Test.pdf (13.3 KB) Albert van de Maat, 2014-11-15 11:28 PM

HTML.pdf (16.4 KB) Antoine Lafranchis, 2019-03-19 06:46 PM

LAYOUT HTML.qgz (4.15 KB) Antoine Lafranchis, 2019-03-19 06:46 PM

History

#1 Updated by Nyall Dawson over 9 years ago

Do you have a sample project or HTML you can share?

#2 Updated by Albert van de Maat over 9 years ago

Posted a sample project.
It has 1 composer item "A4", with a label (rendered as html) and an HTML frame using Test.html
Also made a pdf export.

By the way, when making this sample i found that the buttom "update html" in the html-frame doesn't work.
Also there is no update when exported to pdf.

#3 Updated by Giovanni Manghi over 8 years ago

  • Target version deleted (Version 2.6)

#4 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#5 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Open to Closed
  • Resolution set to end of life

#6 Updated by Antoine Lafranchis almost 5 years ago

This issue is still valid... Can someone reopen it please?
I attach a project created with Qgis 3.0.7 (it has one layout and nothing else) and the corresponding output pdf.
A probably related issue, also visible in the same layout: style="height:100%" doesn't work.

#7 Updated by Giovanni Manghi almost 5 years ago

  • Description updated (diff)

Antoine Lafranchis wrote:

This issue is still valid... Can someone reopen it please?
I attach a project created with Qgis 3.0.7 (it has one layout and nothing else) and the corresponding output pdf.
A probably related issue, also visible in the same layout: style="height:100%" doesn't work.

3.0.7 is tool old (maybe you meant 3.7?). Could you please test again on 3.4 or 3.6? If confirmed there we can reopen the ticket.

#8 Updated by Antoine Lafranchis almost 5 years ago

Yes, I meant 3.7.0

#9 Updated by Giovanni Manghi almost 5 years ago

  • Resolution deleted (end of life)
  • Status changed from Closed to Open
  • Affected QGIS version changed from 2.6.0 to 3.7(master)

Also available in: Atom PDF