Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27080

    Hello,

    When rendering rtf then the newlines are ignored if they are inside a <pre> tag. Pdf rendering works fine.

    I used a simple example:

    <html>
    <head>
    </head>
    <body>
    <pre>
    Line 1
    Line 2
    Line 3
    </pre>
    </body>
    </html>

    The output looks like:

    Line 1 Line 2 Line 3

    As rtf output :

    {rtf1
    {info
    {title RTF File}
    {author test}
    }
    {footerpardplainf0fs12 document produced by an evaluation copy of pd4ml. more info: {field{*fldinst{HYPERLINK "https://pd4ml.com/"}}{fldrslt{ul https://pd4ml.com}}}par}pgwsxn11900pghsxn16840paperw11900paperh16840headery600footery600margl707margr707margt707margb707marglsxn707margrsxn707margtsxn707margbsxn707widowctrlf1i0b0fs16{fonttbl{f1 Arial;}{f2 Times New Roman;}{f3 Courier New;}
    }
    {colortbl;red0green0blue0;
    }
    {stylesheet{s17snext17 Text body;}}
    f1i0b0fs20f2i0b0fs20f3i0b0fs16sa201sb201li0ri0{widctlpardbchcf1 Line 1 cf1         Line 2 cf1         Line 3
    par}}

    And as java code:

                pd4ml.outputFormat(PD4Constants.RTF);
    String test = "<html>n" +
    " <head> n" +
    " </head> n" +
    " <body> n" +
    "      <pre>n" +
    "        Line 1n" +
    "        Line 2n" +
    "        Line 3n" +
    "      </pre>n" +
    " </body>n" +
    "</html>";
    pd4ml.render(new StringReader(test), out, urlBase);

    Any ideas ?

    Thank you!
    Rodev

    #29881

    We’ve just fixed the issue in the development build.

    A new maintenance version is expected to be published in about one week.

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

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