Retain Revision Bars Position when Converting DOCX with Track Changes to PDF using C# | Review > Changed Lines

We are evaluating Aspose.Total for an upcoming product which includes conversion of .docx documents to .pdf. When we convert a docx with track changes enabled, we see the bars for the changes appear on the left of the document. Is there some way for them to appear on the right side ?

@mohuk,

Thanks for your interest in Aspose APIs.

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

I am afraid, this feature is currently not available in Aspose.Words API. Your thread has been linked to the appropriate issue (WORDSNET-19724) and you will be notified as soon as it will be supported in future. Sorry for any inconvenience.

Thanks Awais

So I followed the option you mentioned in your post and saw the bars appearing on the right when on MS Word however when I save and convert this document to PDF, it moves the bars back to the left.

So your comment “feature is currently not available” means that even if the source document has moved it to the right, Aspose will still render it on the left?

Please confirm this.

@mohuk,

Please see these sample Word and PDF files (Docs.zip (41.3 KB)).

  • ‘revision bars - msw-2019.pdf’ was generated by using MS Word 2019 on our end.
  • ‘revision bars - 20.5.pdf’ was generated by using the following simple C# Code of Aspose.Words

C# Code

Document doc = new Document("E:\\Temp\\revision bars.docx");
doc.Save("E:\\Temp\\20.5.pdf");

You will find revision bar correctly appear on the right side of ‘revision bars - msw-2019.pdf’ while Aspose.Words currently moves it to left side as shown in ‘revision bars - 20.5.pdf’.

To address this problem, we have logged another issue with ID WORDSNET-20415 to preserve the position of revision bars during converting Word documents to PDF. So, you will get the desired PDF output after when the linked issues will get resolved in future. We apologize for your inconvenience.

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

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.

@mohuk,

Regarding WORDSNET-20415 and WORDSNET-19724, it is to inform you that we have added a new public property RevisionOptions.RevisionBarsPosition and a HorizontalAlignment Enumeration in Aspose.Words for .NET API to get or set rendering position of revision bars during Word document to PDF file conversion.

For example, the following C# .NET code will render revision bars (track changes) in Word document on the right side of a PDF page:

Document doc = new Document("C:\\Temp\\Docs\\revision bars.docx");
doc.LayoutOptions.RevisionOptions.RevisionBarsPosition = HorizontalAlignment.Right;
doc.Save("C:\\Temp\\Docs\\20.7.pdf");