문제

I need a new line in my StringWriter. It is just not happening. Please help.

    stringWrite.WriteLine(Header);
    stringWrite.Write("\n ========================================================");

Header is a string.

I tried stringWrite.WriteLine. That isn't working either.

enter image description here

도움이 되었습니까?

해결책

In this case, since you're writing to PDF files, they require the use of the <br> tags (line break in html) instead of the normal \n format for new lines.

다른 팁

You are missing \r, in Windows a newline is composded of carriage return (\r) and new line (\n) so to create a newline you must add \r\n

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top