I'm using the newest version of Aspose.Words for Java now (I used .NET before, but we switched)
There is this document with docproperties, and I have a method that assigns values to docproperties.
In some cases, the value of a docproperty needs to be a new line. This is because in my document, two docproperties may be placed right after eachother on the same line, like this:
When this docproperty2 has no value, then docproperty1 can just get a value, and docproperty3 can also just get a value on the next line (it is crucial that it is on the next line). No problems here...
However, when docproperty 2 does have a value, then it needs to be placed in between docproperty 1 and docproperty 3. This means that docproperty 1 needs to end with (or just plainly be) a 'new line' value, because we should then end up in the following situation:
When I try using the "\n" string as a value for the docproperty1, it only works if I put text behind the \n. For example: "Lalala \n Lalala" shows up as:
Of course this makes sense because now I am not telling the docproperty that it should be a new line, but I'm assigning a string with a new line in it to the value of the docproperty. Nevertheless, I thought this method could work. However, "Lalala \n" shows up as Lalala without an enter behind it. And a plain "\n" just does nothing at all then.
I guess there would be a better way than using \n, but I don't know how to do it... Can you help me out?