Free Support Forum - aspose.com

Html content with many levels of bullet indent is only rendering the bullets as level 1

When i pass some html text to a PDF paragraph with many levels, all bullets are shown as level one, and not indented properly into sub levels. We are using aspose.pdf 4.1.2.

This text is being inserted into a cell of a pdf.table.

See the html below:


  • Represented Benchmark Electronics, Inc. in its successful $70 million acquisition of the majority of the assets of ACT Manufacturing, Inc., a Chapter 11 debtor, and subsequent cross-border transaction

  • Currently defending Media/Communications, LP, a technology-oriented private equity fund, in an adversary proceeding brought by the United States Government seeking recharacterization and equitable subordination of over $50 million in secured notes.

  • Represented the primary equity holders in the Chapter 11 case of One and Two International Place, the largest office buildings in downtown Boston, which resulted in the holders maintaining a substantial share of the reorganized debtors

  • Ken’s bankruptcy and restructuring experience includes the following:


    • Represented the creditors committee in the following confirmed Chapter 11 cases


      • Malden Mills Industries: creditors received a combination of cash and stock equal to 20 - 25% of their claim;

      • Engage, Inc.: creditors received a cash dividend equal to at least 60% of their claim;

      • RJ Development: creditors will receive a cash dividend in excess of 40% of their claim;

      • Trend-Lines: creditors received 100% of the stock of the reorganized debtor;

      • East Boston Neighborhood Health Center: creditors received a cash dividend of approximately 40% of their claim;

      • New Seabury Properties: creditors received a cash dividend equal to 100% of their claim, plus interest



Hello Jonathan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the scenario using Aspose.Pdf for .NET 4.1.2 and as per my observation when, the bullet items with level greater than 1, are not being displayed in resultant PDF. I have logged it in our issue tracking system as PDFNET-14596. We will investigate this issue in details and will keep you updated on the status of a correction.

Concerning to the issue that you have reported, can you please confirm which version of Aspose.Pdf for .NET you're using and also please share the resultant PDF document.

We apologize for your inconvenience.

Hi Nayyer,

Version 4.1.2 of aspose.pdf.

I've attached the resulting pdf as requested. Please look at the "representative experience" section of the document, which is where the bullet code is being used.

Thanks

Jon

Hello Jonathan,

Thanks for sharing the resource document. I've been able to understand the problem and it would definitely help us while resolving the issue.

Do you have an ETA for a fix to this problem?

Thanks

Jon

Hello Jon,

Currently we’ve looking into the details of this problem and at the moment, we’re not certain about the dates regarding its resolution. As soon as we’ve some definite information, we will be pleased to update you with the status of correction.

Please spare us little time and we will get back to you, shortly. Your patience and comprehension is greatly appreciated in this regard.

We apologize for your inconvenience.

Can i get an update on this? It is a production issue in our environment and has been open for a while.

Jon

Hello Jon,

Our development team is still working over this activity and once we've some definite information regarding its resolution, we would be pleased to update you with the status of correction.

Please accept our humble apologies and be patient. We're really sorry for your inconvenience.

Can i get an update on this?

Thank you

Jon

Hello Jon,

As per our initial estimates, we hope to get these issues resolved in 2 weeks. Please spare us little time and be patient. We regret for your inconvenience.

Hello Jon,

Thanks for your patience.

I'm pleased to inform you that the issue reported earlier has been fixed in Aspose.Pdf for .NET 4.2.1 HotFix shared over 226952. Please try using it and in case you till face any problem or you've any further query, please feel free to contact.

I've also attached the resultant PDF that I've generated using the following code snippet. Thanks for your cooperation.

[C#]

//Instantiate a pdf document
Pdf pdf1 = new Pdf();
//Create a section in the pdf document
Aspose.Pdf.Section sec1 = pdf1.Sections.Add();

//Create string variables with text containing html tags
string s = "

    "+
    "
  • Represented Benchmark Electronics, Inc. in its successful $70 million acquisition of the majority of the assets of ACT Manufacturing, Inc., a Chapter 11 debtor, and subsequent cross-border transaction
  • "+
    "
  • Currently defending Media/Communications, LP, a technology-oriented private equity fund, in an adversary proceeding brought by the United States Government seeking recharacterization and equitable subordination of over $50 million in secured notes.
  • "+
    "
  • Represented the primary equity holders in the Chapter 11 case of One and Two International Place, the largest office buildings in downtown Boston, which resulted in the holders maintaining a substantial share of the reorganized debtors
  • "+
    "
  • Ken’s bankruptcy and restructuring experience includes the following:
  • "+
    "
    • Represented the creditors committee in the following confirmed Chapter 11 cases
    • "+
      "
      • Malden Mills Industries: creditors received a combination of cash and stock equal to 20 - 25% of their claim;
      • "+
        "
      • Engage, Inc.: creditors received a cash dividend equal to at least 60% of their claim;
      • "+
        "
      • RJ Development: creditors will receive a cash dividend in excess of 40% of their claim;
      • "+
        "
      • Trend-Lines: creditors received 100% of the stock of the reorganized debtor;
      • "+
        "
      • East Boston Neighborhood Health Center: creditors received a cash dividend of approximately 40% of their claim;
      • "+
        "
      • New Seabury Properties: creditors received a cash dividend equal to 100% of their claim, plus interest
";

Text t1 = new Text(s);
t1.IsHtmlTagSupported = true;
//Add the text paragraphs containing HTML text to the section
Aspose.Pdf.Table tab = new Aspose.Pdf.Table();
tab.DefaultCellBorder = new BorderInfo((int)BorderSide.All, 0.1F);
tab.ColumnWidths = "100%";

Aspose.Pdf.Row row1 = tab.Rows.Add();\
row1.Cells.Add().Paragraphs.Add(t1);
sec1.Paragraphs.Add(tab);

pdf1.Save(@"d:/pdftest/TextFormating_HTMLIssueTest.pdf");

This hotfix didn't work for me as my output now has #$NL everywhere a html tag seems to be

Hello Jon,

Could You share your code and a sample data (Xhtml string) please? We cannot reproduce this problem.

This is the html beng used for the indented bullets. This is being displayed, but the sub indents are still not working. See attached sample file.

The following is a brief summary of Kenneth's experience and accomplishments:


  • Represented Benchmark Electronics, Inc. in its successful $70 million acquisition of the majority of the assets of ACT Manufacturing, Inc., a Chapter 11 debtor, and subsequent cross-border transaction

  • Currently defending Media/Communications, LP, a technology-oriented private equity fund, in an adversary proceeding brought by the United States Government seeking recharacterization and equitable subordination of over $50 million in secured notes.

  • Represented the primary equity holders in the Chapter 11 case of One and Two International Place, the largest office buildings in downtown Boston, which resulted in the holders maintaining a substantial share of the reorganized debtors

  • Ken’s bankruptcy and restructuring experience includes the following:


    • Represented the creditors committee in the following confirmed Chapter 11 cases


      • Malden Mills Industries: creditors received a combination of cash and stock equal to 20 - 25% of their claim;

      • Engage, Inc.: creditors received a cash dividend equal to at least 60% of their claim;

      • RJ Development: creditors will receive a cash dividend in excess of 40% of their claim;

      • Trend-Lines: creditors received 100% of the stock of the reorganized debtor;

      • East Boston Neighborhood Health Center: creditors received a cash dividend of approximately 40% of their claim;

      • New Seabury Properties: creditors received a cash dividend equal to 100% of their claim, plus interest



  • Represented a telecommunications company involved in an international copyright dispute with the NFL in federal court and the Second Circuit, and won a jury trial for an affiliated satellite provider in civil enforcement action brought by the Florida attorney general.

  • Represented Organogenesis, a biotechnology company, in its Chapter 11 reorganization. Case confirmed with creditors receiving either stock equal to 100% of the reorganized debtor or a 35% cash dividend.

  • Obtained significant settlement for Highfields Capital, an investment fund, in Massachusetts state court litigation against SCOR, SA, a French reinsurance company, alleging fraud, misrepresentation and unfair business practices in connection with an investment in an Irish company.

  • Won summary judgment for Ascent Pediatrics, a subsidiary of Medicis Pharmaceutical Corporation, in litigation brought by a lender and investor alleging a $20+ million breach of a securities purchase agreement

  • Regularly represent Boston-area venture capital and private equity funds in individual transactions acquiring assets of venture investments out of bankruptcy.

  • Successfully defended a start-up telecommunications company against lawsuits in Delaware and Massachusetts federal courts brought by a competitor alleging unfair competition, tortious interference with business relations, breach of contract and theft of trade secrets

  • Advised boards of directors and management of over 50 high technology, biotechnology and other venture-backed companies in insolvency and restructuring matters, including fiduciary duty issues, wind-downs, asset sales, secured party foreclosures, and recapitalizations.

This is some additional html in the document which is displaying the #$NL where the html tags are.


  • Chair, Practice and Procedure Committee

  • Boston Bar Association, Section on Bankruptcy Law, Member

  • American Bankruptcy Institute, Member

  • Association of the Bar of the City of New York, Member

  • Turnaround Management Association, Member

This is the code being used to add both pieces of HTML data to the document (areaContent is where the html is being passed):

TextInfo contentSubHeaderTextInfo = new TextInfo();

contentSubHeaderTextInfo.FontName = "Arial";

contentSubHeaderTextInfo.FontSize = 8;

contentSubHeaderTextInfo.IsTrueTypeFontBold = true;

contentSubHeaderTextInfo.LineSpacing = 2;

TextInfo RepTextInfo = new TextInfo();

RepTextInfo.FontName = "Arial";

RepTextInfo.FontSize = 8;

RepTextInfo.LineSpacing = 2;

Aspose.Pdf.Table contentHeaderTable = new Aspose.Pdf.Table();

contentHeaderTable.ColumnWidths = "385";

contentHeaderTable.Margin.Top = 10;

Aspose.Pdf.Row contentHeaderRow = contentHeaderTable.Rows.Add();

contentHeaderRow.DefaultCellTextInfo = contentSubHeaderTextInfo;

Aspose.Pdf.Row contentRow = contentHeaderTable.Rows.Add();

contentRow.DefaultCellTextInfo = RepTextInfo;

Aspose.Pdf.Cell contentHeaderCell = contentHeaderRow.Cells.Add(title, contentSubHeaderTextInfo);

Text contentText = new Text(areaContent, RepTextInfo);

contentText.IsHtmlTagSupported = true;

Aspose.Pdf.Cell contentCell = contentRow.Cells.Add();

if (!areaContent.StartsWith("

"))

{

contentCell.Padding.Top = 10;

}

contentCell.Padding.Bottom = 10;

contentCell.Paragraphs.Add(contentText);

contentHeaderRow.Border = new BorderInfo((int)(BorderSide.Top | BorderSide.Bottom), 1.0f, new Color("black"));

paragraphs.Add(contentHeaderTable);

Hi,

Sorry for replying you so late.

I'm pleased to inform you that the issue has been resolved in the attached HotFix. Please try using it and in case you still face any problem, please feel free to contact.

I've also attached the resultant PDF document that I've generated. Please take a look.

We are sorry for your inconvenience.

Everything seems to be working now. thank you.

The only issue we have now is that the sub bullets are still represented with the same bullet type. Is there any way it can follow the standard sub bullet types that you get from the word processing systems?

· Item 1

o Item 2

§ Item 3

· Item 4

Hello Jonathan,

Sorry for replying you late.

I have tested the scenario and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-15424. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

The issues you have found earlier (filed as 14596) have been fixed in this update.


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

The update is version 4.2. It does not include any of the fixes provided to me earlier in this post with hotfix 4.2.1. Therefore it is not a fix.

Right now the 4.2.1 hotfix has resolved the following:

  • Bullets are now rendered with sub levels (not working in 4.2)
  • HTML text no longer changes font when iltalic or bold (not working in 4.2)

The outstanding issue is:

  • Although bullets are now preseneted in their sub levels, the bullet types are not changing.

Hello Jonathan,

All fixes from HotFix series "4.2.1" were included in the latest official release "4.2.0". Looks like You are using invalid xhtml, for example "


" instead of "
" or something like. I try to reproduce the problem with your samples now - result is broken for invalid xhtml string, but for correct string it works fine.

Please try to use attached source, it contains your sample code adapted for valid xhtml. In case of fault may be You have an installation issue, so uninstall previous version of product, remove manually Aspose.Pdf for .NET/Bin folder if it's need, install again and try the run sample (though if You can see "4.2.0" version in dlls the installation is ok)