Free Support Forum - aspose.com

Citations format lost after exporting to Google Doc


#1

It seems that the problem is that HTML styling with a negative value is being ignored when converting to Google Doc format by Aspose-words API.

The HTML string for each citation is as follows:

’<p style=“padding-left:24px;text-indent:-24px;line-height:2em;margin-top:2em;”>’ + citationText + '</p>'

The HTML styling for the <p> tag is the well established way to create a hanging indent , where all but the 1st line of a paragraph are indented. The padding-left style pushes the text contents of the paragraph to the right by 24 px. The negative text-indent style then moves the 1st line of the paragraph to the left by 24 px. In this way, all subsequent lines of the paragraph will appear indented to the right.

The hanging indent format is preserved when converting and saving a citation with this styling to a .docx file:
The hanging indent format IS NOT preserved when the same HTML is converted and saved as a Google Doc:

We believe that the issue is that negative values for positioning styles are being ignored when converting HTML to Google Doc format via Aspose-words API.

Aspose-words API use: 17.7


#2

@harshana

Thanks for your inquiry. You are using older version of Aspose.Words 17.7. We suggest you please try the latest version of Aspose.Words for .NET 19.1 and Aspose.Words for Java 19.1 . Hope, this helps.

If you still face problem, please attach the following resources here for testing:

  • Your input document.
  • Please attach the output file that shows the undesired behavior.
  • Please attach MS Word generated file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.


#3

After I update the library, I see below method in HtmlLoadOptions is no longer available

setAllowTrailingWhitespaceForListItems

How could I achieve the same behavior with new library


#4

Even after upgrade the library still the issue is there. How can I share the reproduce steps with you?Can I have a email address of support engineers so that I can work with them


#5

@harshana

Unfortunately, AllowTrailingWhitespaceForListItems property is obsolete and removed. Please, use TxtLoadOptions.DetectNumberingWithWhitespaces Property instead.

If you still face problem, please provide above asked information for further investigation.


#6

I wonder you have separate secure support for paid customer. We already renew our Aspose Words licence for this year.


#7

@harshana

Yes, we are offering what customer is looking for. Please refer to the following support links.

Paid Support
Free Support Forum