Hi Asad,
So, as you are aware, we are creating an application in which we shall read a PDF paragraph by paragraph, send it to an existing application which will modify the text and then write back the new paragraph to the PDF.
Hence, we created a POC in which we replaced a few words with another set of words(ReplaceWord_Working). It worked fine after setTextReplaceOptions on TextAbsorber.
But we needed to send the entire paragraph to the application, hence we requested the feature you provided in the new version. Once we got that, we tried to replace the entire paragraph. But when we tried LineByLine, it did not work since we needed to work with the entire paragraph(not line) but we did notice that the text was not wrapping and we could not find any way to configure ParagraphAbsorber for that.
So, then we tried to (FindReplacePara)
- Read entire paragraph on 1st iteration
- Replace only the 1st line with the entire paragraph and set the other lines as “”(empty string)
but the text did not wrap, especially we did not use TextAbsorber but ParagraphAbsorber.
So finally,
we finally tried to combine the 3rd and 1st approach.
- Read the entire paragraph
- Replace the 1st text fragment with a position marker (“Paragraph1”)
- Use the textabsorber, search for Paragraph1 and replace it by the entire paragraph.
Surprisingly the textabsorber did not wrap text this time.
I have attached the files for your perusal. Please let me know if there is any way that we could make it work.
Also, we would need a feature when in case of text within a table cells would wrap inside the cell and the cell size should resize.Attempts.zip (1.8 MB)