I use the ParagraphAbsorber of Aspose.Pdf to extract TextFragments, then replace the text content, font, and font size in them. However, some TextFragments exhibit chaotic layout and squeezing after the text replacement. How can I address such issues? The provided file “3.pdf” is the original, and “Tgt.pdf” is the file after replacing the text.
3.pdf (133.5 KB)
Tgt.pdf (236.8 KB)
@christy8074
Would you please also share the code snippet that you are using? We will test the scenario in our environment and address it accordingly.
private void Test01(List<TextFragment> TextFragments, string text, string fontName, float fontSize)
{
var font = FontRepository.FindFont(fontName, true);
foreach (var item in TextFragments)
{
item.TextState.Font = font;
item.TextState.FontSize = fontSize;
item.Text = text;
}
}
@christy8074
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-56421
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.