Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
Support using regular hyphens as hard-hyphens
This commit is contained in:
@@ -88,8 +88,23 @@ namespace Volian.Print.Library
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
public class VlnSplitCharacter : ISplitCharacter
|
||||
{
|
||||
public bool IsSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
|
||||
{
|
||||
return (cc[current] == ' ');
|
||||
}
|
||||
public bool IsSplitCharacter(char c)
|
||||
{
|
||||
return (c == ' ');
|
||||
}
|
||||
}
|
||||
public static VlnSplitCharacter mySplitter = new VlnSplitCharacter();
|
||||
public static float TextAt(PdfContentByte cb, Paragraph iParagraph, float x, float y, float width, float height, string debugText, float yBottomMargin)
|
||||
{
|
||||
// Change the chunks to only split on spaces rather than spaces and hyphens
|
||||
foreach (Chunk chk in iParagraph)
|
||||
chk.SetSplitCharacter(mySplitter);
|
||||
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