DOCX comments bar shows in the generated PDF

Hi,

We have upgraded from Aspose for Word 10.8 to 11.5 (Java); this edition solved a lot of our issues and brought long waited features however it broke something that used to work with 10.8.

If there are comments in the Docx then converting it to PDF would show the comments bar even if the comments bar is set to be invisible in the Docx document. It is strange that it shows this bar only for the pages that have comments which is not possible to do in MS Word itself!

I have attached test cases that might be helpful to look at.
My development machine has Aspose for Word 10.8 and 11.5 Java Edition with Windows 7 x64 and MS Office 2010.

Looking forward to hearing from you soon about this.

Thanks & Regards,
Alaa Tadmori, Software Developer
ConSol MENA LTD

Hi Alaa,

Thanks for your inquiry and sorry for the delayed response.

Please note that Aspose.Words’ page layout engine tries to mimic the way the Microsoft Word’s page layout engine works. To you, this means that if you convert a Microsoft Word document into PDF, XPS or print it using Aspose.Words, the output will appear almost exactly as if it was done by Microsoft Word. But of course Aspose.Words does not utilize Microsoft Word. In order to achieve what you’re looking for, I would suggest you please use the following code snippet:

// Load document
Document doc = new Document(@"C:\test\comments-bar_en.docx");
// Collect all comments in the document
NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);
// Remove all comments.
comments.Clear();
// Render to PDF
doc.Save(@"C:\test\out.pdf");

I hope, this will help.

Best Regards,

Hi Awais & Thanks for your reply.

I understand that Aspose mimics Word and I wouldn’t have reported this issue as a bug unless it is something that happens in Aspose but not in Word. To further explain the issue that I already explained in my previous post here is two points that happen with Aspose 11.5 that not happen in Word:

  1. if the document has comments but you hide them from Review > Tracking > show Final and then you choose to save the document with Word you will find that the generated pdf doesn’t have the comments/comments bar but if you try to convert it with Aspose it shows the comments/comments bar.

  2. if you didn’t choose to hide the comments in the document (that is if the comments/comments bar is visible in the docx document) then you choose to save the document as pdf with Word you will get the comments bar over all pages; with Aspose only the pages that actually have comments will have a comments bar but pages that don’t have comments will not have one which makes the generated pdf look inconstant (this shows in the previous post attachment 11.5.pdf).

Please note, as I previously mentioned, that this used to work perfectly fine with Aspose 10.8.
Also please note that, as I previously mentioned, we are using Java so kindly if you want to send me any further snippets send them in Java not in C#.

Hope this clarifies the issue.
Thanks & Regards,
Alaa Tadmori Software Developer
ConSol* MENA LTD

Hi
Thanks for your request.

  1. You can easily render final layout. Please see the following code:
Document doc = new Document("C:\\temp\\in.doc");
doc.acceptAllRevisions();
doc.getChildNodes(NodeType.COMMENT, true).clear();
doc.save("C:\\temp\\out.pdf");
  1. We are aware that comments rendering is not ideal yet. We are still working on this feature. Your request has been linked to the appropriate issue. We will let you know once rendering of comments is improved.

Best regards,

The issues you have found earlier (filed as WORDSNET-2120) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(25)

I have used the designated version (13.4.0) of Aspose but the issue still persist as earlier explained in post (08-12-2012, 4:17 AM). I have been testing on the same templates I have attached before and getting same results!

Hi Alaa,

Thanks for your inquiry.

Please note that there are two issues linked to your request. WORDSNET-2120 was related to ‘Supporting revision marks upon rendering/converting to PDF’ and its fix is included in Aspose.Words 13.4.0. However, unfortunately, the other issue (WORDSNET-5712) which is related to ‘Improving comments rendering’ is not resolved yet. I regret to share with you that WORDSNET-5712 has been postponed. You will be updated via this forum thread once your remaining issue is resolved.

We are really very sorry for your inconvenience.

Best regards,