Getting performance issue while saving pdf with memorystream

Hi,

I have a performance issue while saving in pdf with Memorystream.Its taking 7-8 seconds for a 3 pages.

Here is my snippest code :

MemoryStream pdfStream = new MemoryStream();

Pdf pdf = new Pdf();

doc.Save(pdfStream, SaveFormat.AsposePdf);

pdf.BindXML(pdfStream, null);

pdf.IsImagesInXmlDeleteNeeded = true;

pdf.Save(pdfStream);

pdfStream.Close();

can any one from aspose help me out for this issue?

Thanks,

shail

Hi,

Can you please provide us with the word file so that we can test this issue.

Thanks.

Hi,

Here is the file which i am testing right now. Its a simple file.

Thanks,

Shail

Hi,

I have tested the file and for me it takes only one second. Please add the following lines before you call save to speed up the process.

pdf.IsTruetypeFontMapCached = true;

pdf.TruetypeFontMapPath = System.IO.Path.GetTempPath();

Thanks.

Adeel,

Its works. Its really good solution. Its taking 1.5 seconds.

Thanks,

Shail