We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Textfragmentabsorber not wrapping to next line

I am trying to use text fragment absorber to grab and replace some text inside of a pdf but for some reason it will not wrap to the next line. For example, the text can be something like “The quick brown fox jumped over the lazy dog”, but the the sentence is split over two lines. No matter what I do it does not grab any text on the second line. I have tried copying and pasting the literal string, including a \r\n or just \n where the break is, and have tried regex. Nothing works. Something to note is if I use regex to just grab any and all text in the document, it stops at the end of every line and records each line as separate from one another. I assume what is happening is it is interpreting each line separately, so there is no continuity and \r\n or \n will not work. Is there something I can do to fix this?

1 Like

@judiciary

Would you please share your sample PDF document along with the sample code snippet that you are using? We will test the scenario in our environment and address it accordingly.