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

Free Support Forum - aspose.com

Exception: URI formats are not supported - Converting HTML to RTF

Using latest v10.6, was working in v9.x (January 2011) - just upgraded.
Converting HTML to RTF and getting an exception on the line in red:

DocumentBuilder builder = new DocumentBuilder();
builder.InsertHtml(html);
string sTempFilename = AdeptUtilities.FileUtil.GetTempFilename("rtf", AO.Image_Folder_ThisUser, "rtf");
RtfSaveOptions oRTFSaveOptions = new RtfSaveOptions();
oRTFSaveOptions.ExportImagesForOldReaders = true;
builder.Document.Save(sTempFilename, oRTFSaveOptions);

HTML:

asdjfkjsldkjfklsjdlkfjlaksjdflkjoiwreuioruiower


 

 

 

 

Hi

Thanks for your request. But I cannot reproduce the problem on my side. I used the latest version of Aspose.Words for testing. You can download the latest version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

I used the following code for testing:

string html = File.ReadAllText(@"Test001\test.html");

DocumentBuilder builder = new DocumentBuilder();

builder.InsertHtml(html);

RtfSaveOptions opt = new RtfSaveOptions();

opt.ExportImagesForOldReaders = true;

builder.Document.Save(@"Test001\out.rtf", opt);

Best regards,

Hi,

What does the error mean? How and why does it happen?

Thank you,

Tim

Hi Tim,

Thanks for your request. Have you checked the path where the document should be saved. Maybe the problem occurs on your side because path is in incorrect format.

Also it would be great if you attach a simple application that will allow us to replicate the issue on our side.

Best regards,