Html support for text fragment

Hi,

Recently I have upgraded Aspose, as there were top margin issues with 6.6 build.

Here is my code -
Document adapterPDF;
Page mainSection = adapterPDF.Pages.Add();
Aspose.Pdf.Table mainTable = new Aspose.Pdf.Table();
Aspose.Pdf.Row mainRow = mainTable.Rows.Add();
TextFragment s = new TextFragment(“sss”);
mainRow.Cells.Add().Paragraphs.Add(s);
mainSection.Paragraphs.Add(mainTable);

My issue is that, the html text is not recognized. I am getting sss as the cell text. The text is not displayed as bold.
In earlier version, we had Aspose.Pdf.Generator.Text which had IsHtmlSupported property. How can I set this to TextFragment.
Please suggest
Thanks,
Sharanya

Hi Sharanya,


Thanks for your inquiry. I’m afraid currently Aspose.Pdf.Document(DOM approach) renders HTML document to PDF document but currently, it doesn’t support to include HTML contents in PDF document, as you are including HTML using IsHtmlTagSupported property with Aspose.Pdf.Geneartor namespace. We’ve already logged this feature request as PDFNEWNET-35804 in our issue tracking system. We will update you via this forum thread as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

Hi,



I have text with html tags. Without DOM approach , using Aspose.PDF.Generator, I was able to generate perfect table with content neatly displayed. But the issue here was, defaultcellpadding for the table was not applied from second page onwards. Especially the top margin was not applied.

I posted the issue in forum and you guys suggested me to take latest aspose dll and follow DOM approach. But it looks like the earlier version was much better. When you are upgrading something, why would you take some feature away?

I am lost. Cant figure out which dll to use. I want html support and also top cell padding , as I have superscript html tag used in cell where the content bleeds to the header since top padding is not applied.

Please suggest and this is very urgent



Thanks,

Sharanya

Hi,

I am using the latest dll but not following DOM approach as there is no html support for the Text.

So I am still using Aspose.Pdf.Generator.Section, Aspose.Pdf.Generator.Table for writing the table.
I have similar kind of table shown below -

AAA

BBB

CCC

DDD

EEE

FFF

GGG

HHH

III

JJJ

KKK

LLL

MMM

NNN

OOO

PPP


If the table has many rows, where the rows continue to next page, the rowspan doesn't work properly. I get single row of data in 3 pages and then the remaining all the rows in 4th page. Why is this issue happening?

Here goes my code -

There is a class named StaticPDFVO which has the attributes such as type, number, quantity
I have List StaticPdfList with 60 items in it , data ordered by type

int iteration = 0; string slotType=string.empty;int busTypeRowspan = 1;
foreach(StaticPDFVO adapter inStaticPdfList)
{
iteration++;
Aspose.Pdf.Generator.Row dataRow = mainTable.Rows.Add();
if (adapter.type != slotType)
{
slotType=adapter.type;
dataRow.Cells.Add().Paragraphs.Add(adapter.type);
if (iteration != 1)
{
busTypeRowSpan++;
mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;

}
busTypeRowSpan = 1;
}
else
{
busTypeRowSpan++;
}
dataRow.Cells.Add().Paragraphs.Add(adapter.number);
dataRow.Cells.Add().Paragraphs.Add(adapter.quantity);
}
iteration++;
busTypeRowSpan++;

mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;

All the rows are spanned for a type. I have many records having the same type. Since I am spanning those rows, the spanning continues to the same table in the next page.
But the rows are broken randomly and I am not getting the proper output.
Please suggest

Thanks,
Sharanya

Hi Sharanya,


Thanks for sharing the details. We are working over this query and will get back to you soon.
Hi Sharanya,

Thanks for your feedback.

sharanya:
Hi,

I have text with html tags. Without DOM approach , using Aspose.PDF.Generator, I was able to generate perfect table with content neatly displayed. But the issue here was, defaultcellpadding for the table was not applied from second page onwards. Especially the top margin was not applied.
I posted the issue in forum and you guys suggested me to take latest aspose dll and follow DOM approach. But it looks like the earlier version was much better. When you are upgrading something, why would you take some feature away?
I am lost. Cant figure out which dll to use. I want html support and also top cell padding , as I have superscript html tag used in cell where the content bleeds to the header since top padding is not applied.
Please suggest and this is very urgent

Thanks,
Sharanya


We are sorry for the inconvenience caused. We’ve shared your concerns with our development team. The development team is working hard to implement this feature in new DOM and hopefully it will be implemented in Decemeber 2013 - January 2014. However, we will notify you as soon as we made some significant progress in this regard.

Best Regards,
Hi Sharanya,

sharanya:
Hi,

I am using the latest dll but not following DOM approach as there is no html support for the Text.

So I am still using Aspose.Pdf.Generator.Section, Aspose.Pdf.Generator.Table for writing the table.
I have similar kind of table shown below -

AAA

BBB

CCC

DDD

EEE

FFF

GGG

HHH

III

JJJ

KKK

LLL

MMM

NNN

OOO

PPP


If the table has many rows, where the rows continue to next page, the rowspan doesn't work properly. I get single row of data in 3 pages and then the remaining all the rows in 4th page. Why is this issue happening?

Here goes my code -

There is a class named StaticPDFVO which has the attributes such as type, number, quantity
I have List StaticPdfList with 60 items in it , data ordered by type

int iteration = 0; string slotType=string.empty;int busTypeRowspan = 1;
foreach(StaticPDFVO adapter inStaticPdfList)
{
iteration++;
Aspose.Pdf.Generator.Row dataRow = mainTable.Rows.Add();
if (adapter.type != slotType)
{
slotType=adapter.type;
dataRow.Cells.Add().Paragraphs.Add(adapter.type);
if (iteration != 1)
{
busTypeRowSpan++;
mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;

}
busTypeRowSpan = 1;
}
else
{
busTypeRowSpan++;
}
dataRow.Cells.Add().Paragraphs.Add(adapter.number);
dataRow.Cells.Add().Paragraphs.Add(adapter.quantity);
}
iteration++;
busTypeRowSpan++;

mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;

All the rows are spanned for a type. I have many records having the same type. Since I am spanning those rows, the spanning continues to the same table in the next page.
But the rows are broken randomly and I am not getting the proper output.
Please suggest

Thanks,
Sharanya

We have already investigated your described scenario here and logged an investigation ticket for the issue as PDFNEWNET-36054 in our issue tracking system accordingly. Now we have a good news for you that your reported issue has been fixed in new DOM approach and it's fix will be included in Aspose.Pdf for .NET 8.7.0 after successful testing. However, we will notify you as soon as the fix is published and it gets available for download.

Thanks for your patience and cooperation.

Best Regards,

Hi,

Is the above issue I mentioned (spanning if continued to next page, behaves erratically) fixed in the latest dll? I believe it is 8.7.0.
If no, please let me know the timeline as when it is available?

Thanks,
Sharanya

Hi,

Does the new version 8.7.0 support html tags?

Also in version 6.6, there was a issue of row spanning if the rows continue to the next PDF page and if I give rotation angle to the text. Please let me know if this issue is also resolved in the new version.

Thanks,
sharanya

Hi Sharanya,

Thanks for your inquiry.

sharanya:

Does the new version 8.7.0 support html tags?

I am afraid the Html string is still not supported in Text Fragments. Our development team is looking into the enhacement request and hopefully if everything goes as per plan then it would be available in January release. However, as soon as this issue is resolved we will notify you via this forum thread.

sharanya:

Also in version 6.6, there was a issue of row spanning if the rows continue to the next PDF page and if I give rotation angle to the text. Please let me know if this issue is also resolved in the new version.

Yes your reported issue of row span has been fixed, please check related post for the details.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35804) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)

Hi Sharanya,


Thanks for your patience. As stated above PDFNEWNET-35804 is also resolved and now you can add HTML string in new/existing document using new DOM approach. Please check following documentation link for the purpose. It will help you to accomplish your requirements.


Please feel free to contact us for any further assistance.

Best Regards,