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

Free Support Forum - aspose.com

Word to SVG conversion does not preserve whitespace as characters when copy/pasting

I am using Aspose.Words for .NET. We use this in order to convert word documents to SVGs that can be displayed in a browser. If a user tries to copy and paste text from the SVG in the browser, the spaces between words are not preserved as characters that can be copied to the clip board. This means that when a user tries to copy and paste text from the document, all the words run together because the spaces are not copied to the clipboard as well. Is there an option I can use when converting the document to SVG that will preserve the spaces as characters?

I tried changing the SvgSaveOptions.TextOutputMode to different options to no avail. I am using version 16.1 but looking at the documentation there doesn’t seem to be an option for this in newer versions either.

@morlando016,

Please ZIP and upload your input Word document and Aspose.Words generated SVG file showing the undesired behavior here for testing. We will investigate the issue on our end and provide you more information.

@awais.hafeez here are the files attached. Notice how if you highligh the SVG file and try to ctrl + c and paste somewhere, all the words run together. Aspose Example Files.zip (11.7 KB)

@morlando016,

Thanks for your inquiry. After an initial test with latest version of Aspose.Words for .NET i.e. 18.5, we were unable to reproduce this issue on our end (please see 18.5.zip (1.1 KB)). We would suggest you please upgrade to the latest version of Aspose.Words for .NET. Please check the following link.

https://docs.aspose.com/display/wordsnet/installation

Thanks @awais.hafeez. I will try that out.