Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26272

    Does PD4ML support the CSS attribute “font-size=x-large”?

    I’m trying to convert a document that’s created from a Wiki style rich text editor. The editor uses that attribute. I’m not able to preserve the size of the font after conversion. Is there a work around?

    Thanks in advance for any pointers.

    — jerry

    #27548

    Yes, it is supported. But from CSS syntax perspective “font-size=x-large” is incorrect. It should use a colon symbol like that:

    Test

    Also please take into account: the resulting font size in PDF also depends on HTML-to-PDF scale factor. The scale factor is calculated this way:

    htmlToPdfScale = ( pageFormat.width – pageInsets.left – pageInsets.right ) / htmlWidth

    See:
    pd4ml-html-css-pdf-tips-tricks-f7/can-i-pre-define-font-sizes-in-resulting-pdf-documents-t19.html

    #27549

    Thanks for the reply and sorry about the typo.

    Here is a test case<br /> <html><br /> <head><br /> <style><br /> <br /> .problem_style p, span {<br /> font-size: inherit;<br /> }<br /> <br /> </style><br /> </head><br /> <br /> <body><br /> <br /> <div><br /> <span style="font-size: xx-large;"><br /> <span style="text-decoration: underline;"><br /> <em><strong>456</strong></em><br /> </span><br /> </span><br /> </div><br /> <br /> </body><br /> </html><br />

    Converting this to PDF will lose the font size. Through trial and error I found two tweaks can work around the problem
    1. remove the problem_stype
    2. swap the order of the two spans, i.e. <br /> <span style="text-decoration: underline;"><br /> <span style="font-size: xx-large;"><br />

    Unfortunately, I do need the style for the page, and the content is created from a 3rd party rich text editor. Therefore I could use neither work-around.

    Do you have any suggestions how I can make this work?

    Again, thanks in advance for any tips.

    — jerry

    #27550

    We’ll address the issue on Monday.

    #27551

    Just-published v351b17 should fix the problem.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.