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

Free Support Forum - aspose.com

Getting some problem when using DocumentBuilder.InsertHTML

Hi,

I am trying to render the following HTML using Aspose.Words.DocumentBuilder.InsertHTML. But i am getting some issues.

<BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"><P><FONT style="BACKGROUND-COLOR: #cc0000">Rama killed Ravana's in sri lanka</FONT></P></BLOCKQUOTE><P><HR></P><TABLE style="WIDTH: 206px; HEIGHT: 76px" borderColor="#ff0033" cellSpacing="2" cellPadding="2"bgColor="#0000ff" border="1"><TBODY><TR><TD><P> </P></TD><TD><P> </P></TD><TD><P> </P></TD></TR><TR><TD><P> </P></TD><TD><P> </P></TD><TD><P> </P></TD></TR><TR><TD><P> </P></TD><TD><P> </P></TD><TD><P> </P></TD></TR></TBODY></TABLE>

Issues:

is not rendering

  1. Text indent is not getting applied

  2. Text background color is not getting applied

  3. Table not rendering as like as HTML view on browser.

Here with i am sending Sample.zip whcih contains 2 images. One is for showing html view on browser and another one is for showing word document output. As well as i attached sample document also.

Thanks for providing all information necessary to reproduce the problem. I have logged this to our defect base as issue #1097. We will look at it shortly and inform you of the results.

Best regards,

Hi,

I am using Aspose.Words.DocumentBuilder.InsertHTML to render the following html tag. While using its not rendering the font color.

Sample html tag:

Create __________ in the Blank (8)

Thanks in advance,

I.Prabhaharan.

Thanks for providing additional info. I have added it to the defect description. We will try to fix it in the next release which will be published in a few weeks.

Best regards,

  1. The tag is currently not supported. See https://docs.aspose.com/words/net/features/

  2. The

tag is also ignored, refer to the same document.

3) Use rather than . Due to different reasons we support the same CSS styles during both import and export, and we export font properties as attributes.

4) Yes, we are going to rework table layout mechanism to produce tables exactly as Word (not any browser BTW). So this will be fixed later.

5) Use the # symbol at the beginning of a hexadecimal color value.

The above is not supported by Aspose.Words according to the spreadsheet with import/export limitations. At the moment only the following is supported for table width:

Hi,

I am using AsposeWords.insertHTML() to render the content.

But the

is not rendering. I checked this with latest version of Aspose.Words.dll ( version 3.7.1.0) . Still its not working.

And for pdf i am using the same AsposeWords.insertHTML() to insert html contents and after that i am converting the format of that Aspose.word to Aspose.pdf.

Give some suggestion to how to render this

tag?

With this i have attached the sample file for both Word as well as Pdf and HTML view also.

Thanks And Regards

I.Prabhaharan.

Hi,

I am not using the style attribute within table tag .

I am using DocumentBuider.insertHTML() to render the table of Aspose.Word.dll(Version 3.7.1.0),but its not rendering properly as in HTML view .

And in pdf i am using the same DocumentBuider.insertHTML() to render the table and finally i am converting the format of word into pdf and storing in Aspose.pdf document.

With this i have attached the sample files for the same.i am sending code for your reference.

Lakshmicsf

Chaya

Sharada

Chaya sffgf

Sharada

Lakshmi

Sharada fgfg

Lakshmi

Chaya

Thanks and Regards,

I.Prabhaharan.

Concerning

please attach the HTML sample. I will check what could be done.

As for table import try our latest 4.0 version. HTML import is strongly improved there.

Best regards,

Hi

Herewith i am forwarding the code for your reference which consists of

Left1

Right1

Left2

Right2

Could u please let me know when the Aspose.Word.dll(version 4.0) will be released.

Thanks and regards,

I Prabharan

Aspose.Words 4.0 beta is available for download. Despite its ‘beta’ suffix it is a fully workable version. It features some breaking changes in the API, mostly in working with images and shape which can break the existing code. Otherwise, it is just a normal version with several major improvements, especially in HTML handling. Read more about the new release here:

https://docs.aspose.com/words/net/release-notes/

BLOCKQUOTE import is not supported yet and it is just converted to normal text now.

Also indents as other paragraph level formatting inline style attributes are supported only for paragraph § tags at the moment. It will be fixed eventually as we are constantly improving our HTML export/import engine.

Best regards,

Hi,

Could you pls give me the URL to download Aspose.Words 4.0 beta .

Thanks & Regards,

I.Prabhaharan.

Here:

https://downloads.aspose.com/words/net

Best regards,

Hi,

I have posted my issue 10 days back. Could u please go through the issue and help me to srt out the problem as early as possible.

Thanks and regards,

I Prabhaharan

hi,

I am not able to render BLOCKQUOTE and HR tags in both Aspose.words(version 4.0) and Aspose.Pdf(Vesrion 3.1.7.0). could u pls guide me to solve this problem as early as possible.pls refer the code which i have send for BindHTML() for table problem where i have tried to solve for BlockQuote.

Thanks and Regards,

I Prabhaharan

BLOCKQUOTE and HR tags are not supported yet during HTML import. We will add support for them but later.

Best regards,

Hi,

I am using Aspose.Words.dll(beta version 4.0) and Aspose.pdf.dll(version 3.1.5.8)

I am rendering HTML contents by means of builder.Insert Html( ) of Aspose.Words .After that i am saving that into pdf object by means of Aspose.Words.document.save(stream,saveFormat).

The background-color for font is not coming in pdf documents only,but its coming for word document.

Following is the code i used for conversion from word to pdf :

Dim ObjMemoryStream As New System.IO.MemoryStream

doc.Save(ObjMemoryStream, Aspose.Words.SaveFormat.FormatAsposePdf)

Dim tmpPDF As New Aspose.Pdf.Pdf

tmpPDF.BindXML(ObjMemoryStream, Nothing)

ObjMemoryStream.Close()

The HTML code is as follows

"This is my first"

As u suggested i used tag instead of using in that case also its not coming

"This is my first"

I want to know what are the HTML tags that will be supported by Aspose.Pdf.dll (version 3.1.7.0)

If its not supported,please give me some other alternative to acheive this font background color.

Herewith i have attached the word,pdf,html output file for the same.

Thanks & regards,

I.Prabhaharan.

Hi,

I am using Aspose.Words.dll(beta version 4.0) and Aspose.pdf.dll(version 3.1.5.8)

I am rendering HTML contents by means of builder.Insert Html( ) of Aspose.Words .After that i am saving that into pdf object by means of Aspose.Words.document.save(stream,saveFormat).

The background-color for font is not coming in pdf documents only,but its coming for word document.

Following is the code i used for conversion from word to pdf :

Dim ObjMemoryStream As New System.IO.MemoryStream

doc.Save(ObjMemoryStream, Aspose.Words.SaveFormat.FormatAsposePdf)

Dim tmpPDF As New Aspose.Pdf.Pdf

tmpPDF.BindXML(ObjMemoryStream, Nothing)

ObjMemoryStream.Close()

The HTML code is as follows

"This is my first"

As u suggested i used tag instead of using in that case also its not coming

"This is my first"

I want to know what are the HTML tags that will be supported by Aspose.Pdf.dll (version 3.1.7.0)

If its not supported,please give me some other alternative to acheive this font background color.

Herewith i have attached the word,pdf,html output file for the same.Eagarly waiting for your reply.

Thanks & regards,

I.Prabhaharan.

That question was already answered in another thread:

<A href="

I would like to ask you once more not to post different issues in the same thread and avoid making duplicate posts. That creates confusion in the forum. A good practice is to post each issue in a separate thread under a name that states the problem in a clear and brief form. It will also benefit other users helping them to find information relative to their problem much easier.

Thanks for understanding,

Table width defined as

is now supported during HTML import in Aspose.Words 4.0 release. Some other HTML import problems were also fixed. Please try running your application with the latest version.

Best regards,