Html functionality is very buggy and hard to use

I am running into multiple bugs while creating a fairly simple pdf. Some of these (the ones I wrote down before giving up) are

1. TextInfo.AlignmentType doesn’t work with html segments; current workaround is to create a table tag (no idea what to do about justify text, fortunately I am not using any) [1]

static Text GetTitle(Section section, string title) {
var text = new Text(section);
text.TextInfo.Alignment = AlignmentType.Center;
text.TextInfo.FontSize = 12;
text.IsHtmlTagSupported = true;
var segment = text.Segments.Add();
segment.Content = string.Format("

{0}
", form);
return text;
}

2. css text-align doesn’t appear to do anything
3. html tag does nothing ( the only way I am able to center text is with the table tag above)
4. css margin-left and padding-left appear to do nothing (how can I indent text?); the only method of indentation I have discovered is:
string.Format("
{0}
",text)
5. successive
tags do not provide multiple line breaks[1]
6.   doesn’t provide a non-breaking space[1]
7. Section.InsertFooter() doesn’t insert a footer; appears to insert a regular paragraph; code snippets:
var pdf = new Pdf();
InjectLicense();
pdf.DefaultFontName = “Arial”;

var section = pdf.Sections.Add();
section.TextInfo.FontName = “Arial”;
section.Paragraphs.Add(GetPdfHeader(section));
var pagefooter = section.InsertFooter(HeaderFooterType.Both);
pagefooter.Paragraphs.Add(GetPageFooter(section));




Text GetPageFooter(Section section) {
var text = new Text(section);
text.TextInfo.Alignment = AlignmentType.FullJustify;
text.TextInfo.FontSize = 10;
text.IsHtmlTagSupported = true;
var segment = text.Segments.Add();
segment.Content = _footer;
return text;
}


[1]: these are regressions that were properly working in at least 4.1 (the previous version of this library I used)

Hello Bill,

Thanks for using our products.

We are working over this query and will get back to you soon. We apologize for the delay and inconvenience.

bbarry_sf:
I am running into multiple bugs while creating a fairly simple pdf. Some of these (the ones I wrote down before giving up) are

1. TextInfo.AlignmentType doesn't work with html segments; current workaround is to create a table tag (no idea what to do about justify text, fortunately I am not using any) [1]

static Text GetTitle(Section section, string title) {
var text = new Text(section);
text.TextInfo.Alignment = AlignmentType.Center;
text.TextInfo.FontSize = 12;
text.IsHtmlTagSupported = true;
var segment = text.Segments.Add();
segment.Content = string.Format("
{0}
", form);
return text;
}

Hello Bill,

Thanks for using our products.

I am sorry to inform you that TextInfo.AlignmentType property is not working when Text.IsHtmlTagSupported is set to True. The problem is already logged in our issue tracking system as PDFNET-24023.

bbarry_sf:

2. css text-align doesn't appear to do anything

I have been able to notice this problem. For the sake of correction, I have logged it as PDFNET-24119 in our issue tracking system.

bbarry_sf:


3. html tag does nothing ( the only way I am able to center text is with the table tag above)

I have logged this problem as PDFNET-24120 in our issue tracking system.

bbarry_sf:

4. css margin-left and padding-left appear to do nothing (how can I indent text?); the only method of indentation I have discovered is:
string.Format("
{0}
",text)

I have been able to reproduce this problem and have logged it as PDFNET-24121 in our issue tracking system.

bbarry_sf:

5. successive
tags do not provide multiple line breaks[1]

I have tested the scenario with latest release version of Aspose.Pdf for .NET 5.0.0 and I am unable to notice any problem. Can you please try using it and in case you still face any problem, please share the source HTML so that we can test the scenario at our end.

bbarry_sf:

6.   doesn't provide a non-breaking space[1]

I am unable to notice this problem with Aspose.Pdf for .NET 5.0.0 (available for download over this link)

bbarry_sf:

7. Section.InsertFooter() doesn't insert a footer; appears to insert a regular paragraph; code snippets:
var pdf = new Pdf();
InjectLicense();
pdf.DefaultFontName = "Arial";

var section = pdf.Sections.Add();
section.TextInfo.FontName = "Arial";
section.Paragraphs.Add(GetPdfHeader(section));
var pagefooter = section.InsertFooter(HeaderFooterType.Both);
pagefooter.Paragraphs.Add(GetPageFooter(section));

...


Text GetPageFooter(Section section) {
var text = new Text(section);
text.TextInfo.Alignment = AlignmentType.FullJustify;
text.TextInfo.FontSize = 10;
text.IsHtmlTagSupported = true;
var segment = text.Segments.Add();
segment.Content = _footer;
return text;
}


[1]: these are regressions that were properly working in at least 4.1 (the previous version of this library I used)

I think the Header/Footer is being displayed in section area because you are using following code line to insert Footer in document. section.InsertFooter(HeaderFooterType.Both);. May be you can try section.OddFooter and section.EvenFooter properties. In case you still face any problem, please feel free to contact.

We apologize for your inconvenience.

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


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

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


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

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


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