Html tables within html tables are not formatting properly when added to the PDF

The lst datafile with out the other html files.pdf is the PDF file we produce. We create a number of pdf files from HTML files then we combine all of those PDF files into a single PDF file.


The LST DATAFIELD.zip is a zip of one of the HTML pages we are adding to that PDF. This HTML has a lot of tables embedded in tables but is correct HTML.

The following code is what is being used to convert the html to a PDF…

<span style=“font-size: 10pt; font-family: “Courier New”;”>HtmlLoadOptions htmloptions <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size:10.0pt;font-family:“Courier New”;color:blue”>new<span style=“font-size: 10pt; font-family: “Courier New”;”> HtmlLoadOptions<span style=“font-size: 10pt; font-family: “Courier New”;”>();
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Margin<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Bottom <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size: 10pt; font-family: “Courier New”; color: rgb(255, 128, 0);”>10<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Margin<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Top <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size: 10pt; font-family: “Courier New”; color: rgb(255, 128, 0);”>20<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Margin<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Left <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size: 10pt; font-family: “Courier New”; color: rgb(255, 128, 0);”>5<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Margin<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Right <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size: 10pt; font-family: “Courier New”; color: rgb(255, 128, 0);”>5<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Height <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> PageSize<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageLetter<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Height<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>htmloptions<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageInfo<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Width <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> PageSize<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>PageLetter<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>.<span style=“font-size: 10pt; font-family: “Courier New”;”>Width<span style=“font-size: 10pt; font-family: “Courier New”;”>;
<span style=“font-size: 10pt; font-family: “Courier New”;”>Document htmldoc <span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>=<span style=“font-size: 10pt; font-family: “Courier New”;”> <span style=“font-size:10.0pt;font-family:“Courier New”;color:blue”>new<span style=“font-size: 10pt; font-family: “Courier New”;”> Document<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>(<span style=“font-size: 10pt; font-family: “Courier New”;”>@“c:\temp\LST DATAFIELD.HTML”<span style=“font-size:10.0pt;font-family:“Courier New”;color:navy”>,<span style=“font-size: 10pt; font-family: “Courier New”;”> htmloptions<span style=“font-size: 10pt; font-family: “Courier New”;”>);
<span style=“font-size: 10pt; font-family: “Courier New”;”>

htmldoc.Save(@“c:\temp\test.pdf”);

as you can see in the PDF the html tables do not embed inside of each other properly.

Is there a solution to this issue.

It seems to not wrap data in column quick enough that it should wrap (and is wrappable in HTML file).



Hi Chris,

Thanks for using our API's.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNET-42864 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

any updates from ASPOSE on this?

Hi Chris,


Thank you for the inquiry. The linked ticket ID PDFNET-42864 is pending for the analysis and not resolved yet. Our product team will investigate it as per the development schedule. We will share details when a significant progress has been made in this regard.

any updates from ASPOSE on this?

@chris.coleman,
Unfortunately, there is no update on this yet. We have logged an ETA request under the same ticket ID PDFNET-42864 and will let you know once an update is available in this regards.

Best Regards,
Imran Rafique

Asking again if there is any update on this. Our customer is getting antsy about this.

@chris.coleman,
We are communicating with our product team to get an ETA. However, the ticket ID PDFNET-42864 can take time because there are many other priority tickets in the queue. If the issue is critical to the customer’s development schedules, then we will recommend you please escalate this ticket in the paid support forums. Please refer to the details: Aspose - Paid Support Helpdesk

Did this issue get resolved yet? I think I might be having the same problem.

@BenROhio

Thank you for contacting support.

We are afraid it has not been resolved yet. However, please share narrowed down code snippet along with source and generated files so that we may address your concerns.

The issues you have found earlier (filed as PDFNET-42864) have been fixed in Aspose.PDF for .NET 22.5.