We have a class named TextInfo which contains a property named LineSpacing, sets a float value that indicates the spacing between two text lines. But as you are using the
HTML tag, it has no effect on it. The contents are being placed over Pdf file based over the HTML tag.
As a workaround you can reduce the line spacing by modifying your text string with
Dim myContent As String = "
This is my first div in a p tag #$NL" & _ "This is my second div in the same p tag
"
Where #$NL is the new line feed character. I have attached the resultant Pdf, please take a look.
provides much better results. But, does not display the contents over new line. You need to add the line feed characters to display specific over new line. I have removed and have used #$NL, and the result is much better. As far as I know, The tag is used to group inline-elements in a document, so the results seemed to be correct.
Also could you please explain, "I also have pictures and large XHTML chunks of text witch ends with an unpredictable result"
Dim myContent As String = "This is some text.#$NLThis is some more text.
Bullet one.
Bullet two.
"
The resultant file is in attachment, please take a look.
I have tested the scenario and I am able to notice the same problem. When using #$NL as the last character in a <span> tag, the tag appears over the resultant PDF file. We are looking into the details of this issue and will keep you updated with the status of the correction. We apologize for the inconvenience.
As a workaround, if you place a single character, even a blank space before closing the tag, the resultant file is generated fine. Please take a look and try using the following modified string.
Dim myContent As String = "<span>#$NLThis is some text.#$NL</span><span>This is some more text#$NL </span>"
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.