Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

textFragment.Text taking long time

$
0
0

HI

We are experiencing issue when trying to replace text from PDF document. Issue occurs only on the server where the app is hosted. Locally it works fine.

textFragment.text is taking almost 20 seconds just for changing 1 occurance.

here is the code snippet

Document pdfDocument = new Document(ms);
 TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("test1");
   pdfDocument.Pages[1].Accept(textFragmentAbsorber);
    TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;
 foreach (TextFragment textFragment in textFragmentCollection)
 {
    textFragment.Text = "test2";

}

Any help appreciated

 

Thank you


Viewing all articles
Browse latest Browse all 3131

Trending Articles