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

Free Support Forum - aspose.com

High cpu problem

Hi,

we use aspose words for .net. the version of is old but , we tried new version. we are making replace text in existing word doucment. During this process, high cpu problem occurs. Can you help with this? the block of code is below.


var license = new License();
license.SetLicense(HttpContext.Current.Server.MapPath("~/Content/Aspose.Words.lic"));


var dysResult = _dysService.DownloadFromServer(kullanici, evrak.Icerik.WordDokuman);


using (var mStream = new MemoryStream(dysResult.Item2.Icerik))
{

var mainDoc = new Document(mStream, new LoadOptions(LoadFormat.Docx, null, null));

if (!evrak.Sayi.IsNullOrWhiteSpace())
{
mainDoc.Range.Replace("[SAYI]", evrak.Sayi ?? ā€œā€, false, false);
}

if (evrak.Tarih != null)
{
mainDoc.Range.Replace("[TARIH]", evrak.Tarih.Value.ToString(ā€œdā€), false, false);
}

if (evrak.KonuMetni != null)
{
mainDoc.Range.Replace("[KONU]", evrak.KonuMetni, false, false);
}

if (evrak.EvrakGuid != null)
{
mainDoc.Range.Replace("[BELGEID]", evrak.EvrakGuid.ToString(), false, false);
}

using (var memoryStream = new MemoryStream())
{
mainDoc.Save(memoryStream, SaveFormat.Pdf);

ustyazi.Icerik = memoryStream.ToArray();
ustyazi.OcrText = mainDoc.GetText();
}
}
Hi Yuksel,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Thank you for your interest. As soon as posible, we ' ll send our console project and our sample document.

Hi,
I have tried to upload my application but your system faults bigger. because size of file which is aspose .dll is about 8.5 MB.

Hi,
to upload my application, I removed file whis is names aspose.dll. for security reason, I removed license file. I he added four sample documents. in project.AsposeWordDeneme.zip (717.0 KB)

,

@yyorur,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15745. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.