Convert Hard hyphens to soft hyphens so that the PDF can be searched for hyphens.
Use the ISplitCharacter Interface to treat soft hyphens as non-breaking hyphens (only word wrap on spaces)
This commit is contained in:
@@ -104,7 +104,14 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// Change the chunks to only split on spaces rather than spaces and hyphens
|
||||
foreach (Chunk chk in iParagraph)
|
||||
chk.SetSplitCharacter(mySplitter);
|
||||
{
|
||||
if (chk.Attributes == null || !chk.Attributes.ContainsKey("NoSplit"))
|
||||
{
|
||||
if (chk.Attributes == null) chk.Attributes = new System.Collections.Hashtable();
|
||||
chk.SetSplitCharacter(mySplitter);
|
||||
chk.Attributes.Add("NoSplit", false);
|
||||
}
|
||||
}
|
||||
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||
PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer;
|
||||
float left = x + Offset.X;
|
||||
|
Reference in New Issue
Block a user