Hi,
I have 2 issues with Aspose that don't allow me to go forward at work. I was hoping you could help me with those.
Issue 1. I am copying the content (a paragraph to be precise) of a content control of a document A to the content of a content control of a document B. When copying styles we need to create new styles only when they do not match the styles on the destination document, so I am using ImportFormatMode.KeepDifferentStyles for that when using ImportNode.
The paragraph I am copying has the "Normal" style, and in both documents this "Normal" style is identical (Generis Sans Com, 12, Line spacing: single, space after and before the paragraph: 0pt). However, after importing the node with ImportFormatMode.KeepDifferentStyles and appending it to the content control of the destination document, a new style is created (with ImportFormatMode.KeepDifferentStyles and being the same style in both documents it should just refer to the "Normal" style instead of creating "Normal_0") and also this new style is exactly the same as the "Normal" style but the line spacing is 1.15pt and the space after the paragraph is set to 10pt. I think there might be a bug in Aspose when you have default values (single line spacing and 0pt space before and after the paragraph) or just when the style is identical in both documents, as when I change those values it seems to be copying them as a new style as it should. Plus, if I use ImportFormatMode.KeepSourceFormatting seems to be working fine with default values. Could you let me know if I am missing something here or might be a problem from Aspose?
Issue 2. I have 4 content controls in the destination document, 1 of them is not a full paragraph. I am Importing + appending the same paragraph to all of them and in the normal content controls it works fine, but when trying to append the paragraph (after doing ImportNode) to the content control that does not span a whole paragraph I am getting the following exception "System.ArgumentException: Cannot insert a node of this type at this location.". Is there a way to insert content inside content controls that do not span a whole paragraph?
Thank you for your time.