Html to Table cell data error

Hi Team,
I’m observing like when render the html table data to presentation, then it through error Error: value of index = 1 is out of range 0…1
After research found, if table cell content length more than 923 character, then it through error and second point is like table cell have another html tag like p, h1 etc then it create two entity one for table data and second for html tag and both output is overlap in presentation for more impormatio, please check the below html content and try to render html to presentation.

ABC Inc.

<tr>

	<td valign="middle">
		<img src="_skin_MRS_images_2015_global_header_1.png" />
	</td>
	
	<td>

		<p>Praesent lacinia malesuada neque, non condimentum est ultricies quis. Aliquam est orci, pretium at nisi eget, sodales fermentum tortor. In nisl leo, ultricies id turpis ut, fermentum molestie libero. Donec vulputate lorem ut felis malesuada vestibulum. Fusce mollis, mi eget pulvinar consequat, mi velit tempus turpis, eu pharetra nisl dolor quis dolor. Duis placerat scelerisque metus quis condimentum. Sed aliquam id mi vitae tincidunt. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean a fringilla massa, ut gravida risus. Cras eget quam neque.</p>

		<p>Vivamus porta quam id hendrerit tristique. Morbi facilisis eget elit eu hendrerit. Sed eget arcu in libero suscipit finibus. Ut porta ac massa vitae lacinia. In et ultrices erat. Nunc posuere lorem magna, eget pellentesque leo ornare ut. Aenean fringilla orci sed tempor ultricies.</p>

		<p>Curabitur auctor a ex porttitor finibus. Suspendisse auctor id purus in suscipit. Sed sed neque eget turpis lobortis tempor id diam.</p>
		
		<div>Click <a href="https://www.ABC.com/">here</a> to view ABC home page.</div>

		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent dignissim, nisl nec dictum finibus, leo neque elementum ligula, sit amet aliquam magna ante ac arcu. Fusce bibendum leo et iaculis vehicula. Etiam quis tincidunt urna. Nam faucibus nisl vel tortor malesuada, et posuere velit faucibus. Phasellus quis tempus augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis varius id nisi vitae dictum. Cras tempus neque ligula, sed rutrum lacus scelerisque a. Fusce et quam vulputate, interdum urna in, dictum diam.</p>
	</td>
</tr>
  • ABC is a trusted market access partner specializing in the exchange of information between payers and life sciences companies via technology. Leveraging our FormularyDecisions.com® platform, we support communication, generate data and drive insights for improved reimbursement decisions.
  • Press Release | PhactMI is now accessible from the FormularyDecisions.com platform AMCP eDossier System
    February 06, 2018
    1. 			<a target="_blank" href="https://www.ABC.com/downloads/Dymaxium%20PhactMI%20press%20release%20draft_FINAL%20(003).docx">
      

      Dymaxium is pleased to announce that the phactMI medical information portal is now cross-linked and integrated within the FormularyDecisions.com platform, and accessible in the AMCP eDossier System to its community of evidence reviewers and formulary healthcare decision makers.

      		</li>
      	</ol>
      </li>
      

@Satyjeet1,

I have observed the information shared by you and like to share that Aspose.Slides only allows text related HTML tags inside a text frame of presentation. There is no support available for importing tables directly in slides. I request you to please consider this fact on your end. Secondly, if there is still an issue then I request you to please provide a working sample project along with source information, generated output and desired output for further investigation on our end.

Thanks Mudassir, for quick reply.
I understand your point. I need one more clarification about anchor tag. To support anchor tag, wrote custom code. I their any way to support anchor tag directly?

If I removed my custom code, then it show anchor tag effect in presentation but when I’m tring to click on that nothing happened.

Below is the line to make anchor tag clickable:-

txtFrame.TextFrame.Paragraphs[Y].Portions[K].PortionFormat.HyperlinkManager.SetExternalHyperlinkClick(dicAnchorTagRules.FirstOrDefault(e => e.Key.Contains(txtFrame.TextFrame.Paragraphs[Y].Portions[K].Text)).Value);

@Satyjeet1,

I have observed the information shared by you and request you to please share working sample project reproducing the issue along with generated output with us. I will investigate the issue further on our end to help you out.

testfile.zip (251 Bytes)

@Satyjeet1,

I have used following sample code on my end to import the HTML text shared by you and have generated the presentation with correct hyperlink. I used Aspose.Slides for .NET 18.2.1 on my end.

public static void ImportHMTL()
{
    String path = @"C:\Aspose Data\";
    using (Presentation presentation = new Presentation())
    {
        // Get the first slide
        ISlide slide = presentation.Slides[0];
        // Add an autoshape of type line
 //           Aspose.Slides.IAutoShape ashape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, 300, 300);
        Aspose.Slides.IAutoShape ashape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 0, 0, presentation.SlideSize.Size.Width, presentation.SlideSize.Size.Height);
        ashape.FillFormat.FillType = FillType.Solid;
        ashape.FillFormat.SolidFillColor.Color = Color.Gray;

        // Adding text frame to the shape
        ashape.AddTextFrame("");

        // Clearing all paragraphs in added text frame
        ashape.TextFrame.Paragraphs.Clear();

        // Loading the HTML file using stream reader
        TextReader tr = new StreamReader(path + "testfile.txt");

        // Adding text from HTML stream reader in text frame
        ashape.TextFrame.Paragraphs.AddFromHtml(tr.ReadToEnd());

        ashape.TextFrame.TextFrameFormat.AutofitType = TextAutofitType.Normal;

        presentation.Save(path+"SavedImportHtml.pptx", Aspose.Slides.Export.SaveFormat.Pptx);

    }
}

SavedImportHtml.zip (19.9 KB)