Hi Matanya,
Thank you for your patience,
PdfStringFormat.ClipPath: If we enable the Clip
Path option, the text rendering mode is set to a clipping mode within a text
object.
PdfStringFormat.LineLimit: The default value of
the LineLimit property is true. If we set the LineLimit, the provided string
will be laid out within the specified bounds. If we disable the LineLimit
property, the layout will continue with the remaining spaces.
PdfStringFormat.NoClip: If we enable the NoClip
option, it will show the text without cutting any words. If we disable the
NoClip option, any text outside the fitting area will be hidden.
LineLimit
|
NoClip
|
Result
|
true
|
true
|

|
false
|
true
|

|
true
|
false
|

|
false
|
false
|

|
Please find the code example below,
string
text = @"PdfStringFormat 1
PdfStringFormat
2
PdfStringFormat
3
PdfStringFormat
4
PdfStringFormat
5
";
PdfStringFormat
format = new PdfStringFormat();
format.ClipPath
= true;
format.NoClip
= false;
format.LineLimit
= false;
PdfFont
font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
PdfDocument
document = new PdfDocument();
document.PageSettings.Margins.All
= 0;
PdfPage
page = document.Pages.Add();
PdfGraphics
graphics = page.Graphics;
MemoryStream
stream = new MemoryStream();
graphics.DrawRectangle(PdfPens.Red,
new RectangleF(100, 100, 100, 20));
graphics.DrawString(text,
font, PdfBrushes.Black, new RectangleF(100, 100, 100, 20), format);
document.Save(“Output.pdf”);
|
Regards,
Moorthy K