DrawTextMultiLine skips lines with only CRLF
kuzma-t opened this issue · comments
-
I'm submitting a:
- Vulnerability report -> use the specific form instead!
- Bug report
- Feature request/suggestion
-
[Bug report] What is the current behavior?
DrawTextMultiLine currently doesn't print blank lines; that is, lines with only the CRLF characters. -
[Bug report] What is the expected behavior?
DrawTextMultiLine should also be able to print these lines. -
[Bug report] Please provide the steps to reproduce and if possible a minimal reproduction code of the problem
std::string lines_str{"line1\r\n\r\nline3\r\n"};
painter.DrawTextMultiLine(lines_str, 0.0, 0.0, 200.0, 300.0, PdfDrawTextMultiLineParams());
// expected result should be
// line1
//
// line3
// instead the actual result is
// line1
// line3
-
[Feature request] What feature should be implemented in PoDoFo?
-
Please tell us about your environment:
- Version/git revision: [0.10.0(latest version on vcpkg, as of posting)]
- Operating System: [Windows (64 bits) | MacOs]
- Package manager used: [vcpkg]
-
[Bug report/Feature request] Other information
Some triage, after a while: it makes sense. Something should be done so newlines are processed this way (and \r
ignored, as we don't support MacOS classic, version <= 9) in this function (which maybe could be simplified, as well). It's a low priority for me but patches are welcome.