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

Free Support Forum - aspose.com

Set Revision Bars Location Changed Lines to None, Left, Right, Outside Border

I am trying to modify the location of the RevsionBar in the word doc. In Word you can set the Changed Lines (RevisionBars) to NONE, LEFT, RIGHT or OUTSIDE.

Is there a way that can be done in Aspose? The showRevisionBars(true) enables the bars on the left side of the screen. Can we change it to the right?

Thank you

@aaronbly,

Review | Tracking | Advanced Options | Changed Lines options, as shown in the following screenshot, allow you to instruct MS Word to place revision bars on left, right, outside border or to Ignore (none) those lines.

API to Modify Changed Lines to None, Left, Right, Outside Border

We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-19724. We will further look into the details of this requirement and will keep you updated on the status of the linked issue. We apologize for any inconvenience.

Thanks for the quick response. I want to verify that the ticket being WORDSNET means the requirement would also be looked at for a Java update allowing this? That is what I use and didn’t notice if there was a specific forum for NET or Java questions.

Maybe the bar can be moved after the fact? Can you tell me the equivalent object in Aspose.PDF that is created from the RevisionBar? Is there a way to get that object and move it?

Thank you

@aaronbly,

Please note that the latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET. In your case, the issue which was logged with WORDSNET prefix, would be auto resolved for Java variant of Aspose.Words. Your problem (WORDSNET-19724) will be fixed in Aspose.Words for Java as soon as the linked issue is resolved. Hope, this helps.

We are checking this scenario and will get back to you soon.

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

@aaronbly,

As you know, we had already integrated the fix of WORDSNET-19724 in 20.7 version of Aspose.Words for Java API. Basically, we had added a new public property RevisionOptions.RevisionBarsPosition in Aspose.Words for Java API that you can use along with the HorizontalAlignment Class to get or set rendering position of revision bars (track changes) during Word to PDF conversion.

Java code example to render revision bars (track changes) in Word document on the right side of a PDF page is as follows:

Document doc = new Document("C:\\Temp\\Docs\\revision bars.docx");
doc.getLayoutOptions().getRevisionOptions().setRevisionBarsPosition(HorizontalAlignment.RIGHT);
doc.save("C:\\Temp\\Docs\\awjava-20.7.pdf");

One thing you should note is that values of HorizontalAlignment.CENTER and HorizontalAlignment.INSIDE are not allowed and will cause System.ArgumentOutOfRangeException.