Import of element 'rsids' is not supported in Docx format by Aspose.Words


#1

I keep getting this error when converting MS Word files… Is there any work around for this available? Current Library Aspose.Words v14.11.


#2
Hi Cary,

Thanks for your inquiry. Please upgrade to latest version (15.6.0) of Aspose.Words from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

In case the problem still remains, please attach your input Word document and piece of code here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

#3

I updated to v15.6 with the same issue… The issue is captured using the IWarningCallback.


case “doc”:
case “docx”:
case “dot”:
case “dotx”:
case “html”:
case “mhtml”:
case “rtf”:
Aspose.Words.LoadOptions wordOpt = new Aspose.Words.LoadOptions();
wordOpt.WarningCallback = callbackWord;
wordOpt.LoadFormat = Aspose.Words.LoadFormat.Auto;
wordOpt.PreserveIncludePictureField = true;
if (switchVar == “doc”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Doc;
if (switchVar == “docx”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Docx;
if (switchVar == “rtf”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Rtf;
if (switchVar == “dot”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Dot;
if (switchVar == “dotx”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Dotx;
if (switchVar == “html”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Html;
if (switchVar == “mhtml”) wordOpt.LoadFormat = Aspose.Words.LoadFormat.Mhtml;
try
{
GC.Collect();
GC.WaitForPendingFinalizers();
Aspose.Words.Document wordDoc = new Aspose.Words.Document(input.FullName, wordOpt);
Aspose.Words.Saving.PdfSaveOptions options = new Aspose.Words.Saving.PdfSaveOptions();
options.ImageCompression = Aspose.Words.Saving.PdfImageCompression.Jpeg;
options.SaveFormat = Aspose.Words.SaveFormat.Pdf;
options.TextCompression = PdfTextCompression.None;
options.TempFolder = output.DirectoryName;
options.PreserveFormFields = true;
options.WarningCallback = callbackWord;
wordDoc.Save(output.FullName, options);
}
catch
{
throw;
}
break;

#4

Here is something interesting as well, I updated to Aspose.PDF 10.6 which is now throwing an SEHException when trying to save the same file as an attachment inside a PDF.

using (PdfContentEditor editor = new PdfContentEditor())
{
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, 25, 25);
editor.BindPdf(strNativePdfName_temp);

if (strAttFileName.ToUpper().Substring(strAttFileName.LastIndexOf(@"") + 1) != @“C.GIF” && strAttFileName.ToUpper().Substring(strAttFileName.LastIndexOf(@"") + 1) != @“C.JPG”)
{
using (System.IO.FileStream attStream = System.IO.File.OpenRead(strAttFileName))
{
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 25, 25), strAttFileName, attStream, strAttFileName, 1, “Paperclip”);
//Save the file
try
{
editor.Save(strNativePdfName);
}
catch
{
throw;
}
}
}
}

#5

Hi Cary,


Cary:
Import of element ‘rsids’ is not supported in Docx format by Aspose.Words.
While using the latest version of Aspose.Words i.e. 15.6.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-12134. Your thread has been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Regarding the other issue you’re getting with Aspose.Pdf, I am moving your thread in Aspose.Pdf forum where you’ll be guided appropriately.

Best regards,

#6
Hi Cary,

caryangell:
Here is something interesting as well, I updated to Aspose.PDF 10.6 which is now throwing an SEHException when trying to save the same file as an attachment inside a PDF.
using (PdfContentEditor editor = new PdfContentEditor())
{
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, 25, 25);
editor.BindPdf(strNativePdfName_temp);

if (strAttFileName.ToUpper().Substring(strAttFileName.LastIndexOf(@"\") + 1) != @"C.GIF" && strAttFileName.ToUpper().Substring(strAttFileName.LastIndexOf(@"\") + 1) != @"C.JPG")
{
using (System.IO.FileStream attStream = System.IO.File.OpenRead(strAttFileName))
{
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 25, 25), strAttFileName, attStream, strAttFileName, 1, "Paperclip");
//Save the file
try
{
editor.Save(strNativePdfName);
}
catch
{
throw;
}
}
}
}

Thanks for your inquiry. I am afraid I could not test your code due to missing references. However, I have amend it a bit as following and unable to notice the issue. We will appreciate it if you please share some executable code(sample project) here to replicate the issue. So we will investigate it further.

using (PdfContentEditor editor = new PdfContentEditor())

{

System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, 25, 25);

editor.BindPdf(myDir + "input.pdf");

string strAttFileName = myDir + "NY+Info+.docx";

using (System.IO.FileStream attStream = System.IO.File.OpenRead(strAttFileName))

{

editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 25, 25), strAttFileName, attStream, strAttFileName, 1, "Paperclip");

//Save the file

try

{

editor.Save(myDir+"fileattachment.pdf");

}

catch

{

throw;

}

}

}


Best Regards,


#7

Have we found a solution to this issue?


#8

Hi Cary,


Thanks for your inquiry. Regarding WORDSNET-12134, unfortunately, this issue is not resolved yet. Currently, this issue is pending for analysis and is in the queue. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

#9

FYI there is an issue with the following tags as well “decimalsymbol” , “rsids” , “defaultshapes” when loading/saving using Aspose.Words


#10
Hi Cary,

Thanks for your inquiry. We have passed these details to our product team. We will inform you via this thread as soon as this issue is resolved.

Best regards,

#11

The issues you have found earlier (filed as WORDSNET-12134) have been fixed in this Aspose.Words for .NET 19.10 update and this Aspose.Words for Java 19.10 update.