Hello,
I am using following code to generate document and then replace text. But some white space is remaining in between number and replaced fragment.
Could you please provide me solution for the same.
LatexLoadOptions latexLoadOptions = new LatexLoadOptions();
Document doc = new Document("…/…/LatexDocs/English/ComputedQuants/BrakingDistance.tex", latexLoadOptions);
//Document doc = new Document("…/…/LatexDocs/input.tex", latexLoadOptions);
//doc.Save("…/…/output/GeneralExplnations.pdf");
//doc.Save("…/…/output/merged.pdf");
doc.Save(path+"/BrakingDistance.pdf");
TextFragmentAbsorber fragmentAbsorber = new TextFragmentAbsorber(“HeaderBrakingDistance”)
{
TextReplaceOptions =
{
ReplaceAdjustmentAction = TextReplaceOptions.ReplaceAdjustment.AdjustSpaceWidth
}
have a look at pdfs attached
};
doc.Pages.Accept(fragmentAbsorber);
foreach (TextFragment fragment in fragmentAbsorber.TextFragments)
{
fragment.Text = “Braking distance”;
}
doc.Save(path+"/BrakingDistance_Replaced.pdf");