We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with HTML Rendering in Aspose pdf 8.5

Hi,

I am facing one issue while HTML Rendering . I am using this code segment for HTML rendering in Table , but it is not displaying correctly (expanded over multiple pages). I tried to check the same HTML as HTML page and its working correctly there.

Please refer to "CommentsRow" content in attached code and "Comments" section in pdf.

Aspose.Pdf.Generator.

Segment CommentsTextSeg = new Aspose.Pdf.Generator.Segment("

For Further Information:

Geographic Location:

Contact:

Telephone No.:

E-Mail Address:

Web Site:

U.S.

Candace McManus, FDA Office of Compliance

(877) 260-3731

candace.mcmanus@fda.hhs.gov

Click here

STERIS

(800) 548-4873

Click here

Outside the U.S.
STERIS local representative
");

Please test the same code as pure HTML (attached file TestHTMLPage - please convert it to html) where it is rendered as expected.

Could you please refer to attached code and let me know the resolution of this issue.

Hi Preeti,


Thanks for contacting support.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-36221 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.

Please find attached some more HTML values that have rendering issues.

Hi Preeti,


Thanks for sharing the resource file.

We are working over this query and will get back to you soon.

Hi Aspose team,

Our testing team has reported issue with this HTML also. Please refer to attached resultant pdf with this HTML (html.txt). The data is truncated for all columns (e.g. Year in last column is truncating).



The resolution of these issues are very important to us. Could you please let us know timeline for issue resolution.



Thanks

pgecri:
Hi Aspose team,
Our testing team has reported issue with this HTML also. Please refer to attached resultant pdf with this HTML (html.txt). The data is truncated for all columns (e.g. Year in last column is truncating).

The resolution of these issues are very important to us. Could you please let us know timeline for issue resolution.

Thanks

Hi Preeti,

Thanks for contacting support.

I have tested the above stated scenario using Aspose.Pdf for .NET 8.8.0 and I am able to notice the formatting issues with table contents. For the sake of correction, I have logged this problem
as
PDFNEWNET-36291 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.

PS, for your reference, I have also attached the resultant PDF generated over my end.

[C#]

// load HTML document<o:p></o:p>

Document doc = new Document("c:/pdftest/html.html", new HtmlLoadOptions());

// save resultant PDF file

doc.Save("c:/pdftest/html.pdf");

Hi Preeti,


I have tested the scenario “Table Extra Spacing” specified inside HTML+Issue.xlsx and I am unable to notice any problem. Can you please share some details regarding the issue. For your reference, I have also attached the resultant PDF generated with following code snippet.

[C#]

// load HTML document<o:p></o:p>

Document doc = new Document("c:/pdftest/html.html", new HtmlLoadOptions());

// save resultant PDF file

doc.Save("c:/pdftest/html.pdf");


[HTML]

"<span>

<span>

(1) Model M3001A Multi-Measurement Servers; (2) Model M1020B Pulse Oximetry Modules <i>[Capital Equipment]</i>

</span>

<div>

<span>

<table border=\"1\">

\r\n<tr>

\r\n<td valign=\"top\">

<span class=\"general\">

<p>Options:</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>Serial No. Prefixes:</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>

SpO<sub>2</sub> DSP Fw-Rev Nos.:

</p>

</span>\r\n

</td>

</tr>\r\n<tr>

\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) A01, A01C06, A01C12, A01C18</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) DE512, DE610</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) A.01.41, A.01.42</p>

</span>\r\n

</td>

</tr>\r\n<tr>

\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) A02, A02C06, A02C18</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) DE441, DE512, DE610</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(1) A.01.41, A.01.42</p>

</span>\r\n

</td>

</tr>\r

\n<tr>

\r\n<td valign=\"top\">

<span class=\"general\">

<p>(2) A01, A02</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(2) DE524, DE612</p>

</span>\r\n

</td>\r\n<td valign=\"top\">

<span class=\"general\">

<p>(2) A.01.42</p>

</span>\r\n

</td>

</tr>

</table>\r\n\r\n<span class=\"general\">

<p>Units distributed in the U.S. and internationally

</span>

</span>

</div>

</span>"

Hi Preeti,


I have further tested the scenarios shared in HTML+Issue.xlsx file and following are our observations.

Sr. # 4 - Table going beyond Page width
I have logged this problem as PDFNEWNET-36293 in our issue tracking system.

Sr. # 5 - Table Spacing Issue
During my testing, I am getting ArgumentNullException: Value cannot be null. I have logged this problem as PDFNEWNET-36294 in
our issue tracking system.

Sr. # 6 - Table issue
During my testing, I am getting FormatException: Input string was not in a correct format. I have logged this problem as PDFNEWNET-36295 in our issue tracking system.

Sr. # 7 - Spacing between table rows
I am unable to notice this problem. Resultant PDF (Spacing between table rows.pdf) is attached for your reference.

Sr. # 8 - Table issue
During my testing, I have observed that table borders do not appear in resultant PDF. This problem is logged as PDFNEWNET-36302.

Sr. # 9 - Check Action Needed : Font Size and spacing after table
I have tested the scenario and as per my observations, the table and its contents do not appear properly. The contents of first row and first column appear in very small font. I have logged this problem as PDFNEWNET-36300 in our issue tracking system.

Sr. # 10 - Problem : Font Size
I have observed that unordered list items appear in small font and they both appear in same line. It has been logged in our issue tracking system as PDFNEWNET-36301.

Sr. # 11 - Problem : Table Spacing
Can you please share some details regarding the issue which you are facing. I am afraid I am unable to notice any issue. For your reference, I have also attached the resultant PDF generated over my end.

Sr. # 12 - Table Spacing
I am also unable to notice any issue with this scenario. Please share some details regarding the issue which we are facing. For your reference, I have also attached the resultant PDF generated over my end.

Sr. # 13 - Problem : Table Spacing
I am unable to notice spacing related issue. However I have observed that a special character ý appears instead of line break. Can you please share some details regarding this issue. See attached (Sr. # 12 - Problem Table Spacing.pdf) file.

For other issues specified in your HTML+Issue.xlsx, please share the details so we may investigate and rectify those issue. We are sorry for your inconvenience.

Thanks for looking into reported issues. Please refer to HTML in strPIText in attached code. All HTML is there ; refer commented HTMLs with Serial number mapped to S.No mentioned in “Copy of HTML+Issue.xls”. For example Html#22 is mapped to S.No. in excel.



The problem details are mentioned in column “Problem Details” col of excel .



Please find attached pdfs that has been generated with these HTMLs.The pdf with “_PLeaseCheck” are on priority to resolve.



Thanks in advance.

Hi Preeti,


Thanks for sharing the details.

We are testing these scenarios in our environment and will get back to you soon. Please be patient and spare us little time.

The issues you have found earlier (filed as PDFNEWNET-36294;PDFNEWNET-36291;PDFNEWNET-36292) have been fixed in Aspose.Pdf for .NET 9.4.0.


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

Hi Preeti,


As stated above PDFNEWNET-36292 is fixed. In reference to this fix, please note the PageInfo.IsLandscape does not change size of page. This property is used only by Generator namespace. However in order to set the size of page, you should set MediaBox of the page. For example:
[C#]

Document doc = new Document(“PdfWithText.pdf”);<o:p></o:p>

double w = doc.Pages[1].Rect.Width;<o:p></o:p>

double h = doc.Pages[1].Rect.Height;<o:p></o:p>

doc.Pages[1].MediaBox = new Rectangle(0, 0, h * h / w, h);<o:p></o:p>

doc.Pages[1].CropBox = new Rectangle(0, 0, h * h / w, h);<o:p></o:p>

doc.Save(“changed.pdf”);

Also please note that this code will expand width of the page to fit contents into new document but make width/height ratio equal to height/width in original document (i.e. change orientation of the page). If you need to zoom document you can use PdfPageEditor facade:
[C#]

Document doc = new Document(“PdfWithText.pdf”);<o:p></o:p>

PdfPageEditor ppe = new PdfPageEditor();<o:p></o:p>

ppe.BindPdf(“PdfWithText.pdf”);<o:p></o:p>

double w = doc.Pages[1].Rect.Width;<o:p></o:p>

double h = doc.Pages[1].Rect.Height;<o:p></o:p>

float k = (float)(w / h);<o:p></o:p>

ppe.Zoom = k;<o:p></o:p>

ppe.PageSize = new PageSize((float)h, (float)w);<o:p></o:p>

ppe.Save(“changed.pdf”);


Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-36295;PDFNEWNET-36300;PDFNEWNET-36301;PDFNEWNET-36302;PDFNEWNET-36293) have been fixed in Aspose.Pdf for .NET 9.5.0.


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