we are currently getting the error 'Attempted to Read or Write Protected Memory - this is often an indication of other memory that is corrupt' when calling the Pdf Save method e.g.
pdf.save(docName, Aspose.Pdf.SaveType.OpenInAcrobat, this.Response)
We are loading word template pages into Aspose.Words and then saving the merged document out into PDF format. We have upgraded Apose.words to version 188.8.131.52 as a lot of people on the forums are saying this cures this problem, but unfortunately this has not cured our problem.
We have already tried the following :-
Upgraded our Aspose.Words dll to version 5.0.0 as per the various discussions we have been reading on the aspose forums.
Registered the Apose.words and Aspose.PDF.dll in GAC
Granted read and write permissions on each of the dll's
The Code snippet can where the problems are occuring can be found below :-
private void SendToBrowserAsPdf(Document doc, string documentprinted, string docName, string internalname)
MemoryStream stream = new MemoryStream();
XmlDocument xmlDoc = new XmlDocument();
string pdflicensefile = MapPath(@"..\bin\Aspose.Pdf.lic");
Aspose.Pdf.License pdflic = new Aspose.Pdf.License();
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.IsTruetypeFontMapCached = false;
pdf.Save(docName, Aspose.Pdf.SaveType.OpenInAcrobat, this.Response); // THIS IS WHERE THE ERROR IS GENERATED!
catch (Exception ex_)
Any help would be much appreciated,