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:
Rich
2015-02-09 16:07:12 +00:00
parent 93043d7fd4
commit ad300e777a
4 changed files with 109 additions and 3 deletions

View File

@@ -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;