Hi
I have a license for aspose version 7.1 for .NET
I have a PDF file with placeholders that I need to replace with real data.
image.png (12.8 KB)
The problem is that I have specific fields which need to be replaced with data in Hebrew and the Hebrew text needs to be written in rtl and aligned to the right and write direction rtl. (see the attached picture the result of my code )
image.png (1.9 KB)
I’ll
appreciate your help on how to do it.
My code for replacing the placeholders:
TextFragmentAbsorber textFragmentAbsorber =
new TextFragmentAbsorber("!@@ AccountName@!");
// Accept the absorber for all the pages
pdfDocument.Pages.Accept(textFragmentAbsorber);
// Get the extracted text fragments
STextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;
// Loop through the fragments
foreach (TextFragment textFragment in textFragmentCollection)
{
textFragment.Text = value;
textFragment.TextState.Underline = true;
}
and the pdf test.pdf (251.2 KB)