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("
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.
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.
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
Document doc = new Document("c:/pdftest/html.html", new HtmlLoadOptions());
// save resultant PDF file
doc.Save("c:/pdftest/html.pdf");
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 the following code snippet.
// load HTML document
Document doc = new Document("c:/pdftest/html.html", new HtmlLoadOptions());
// save resultant PDF file
doc.Save("c:/pdftest/html.pdf");
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.
As stated above PDFNEWNET-36292 is fixed. In reference to this fix, please note that PageInfo.IsLandscape does not change the size of the page. This property is used only by the Generator namespace. However, to set the size of the page, you should set the MediaBox of the page. For example:
[C#]
Document doc = new Document("PdfWithText.pdf");
double w = doc.Pages[1].Rect.Width;
double h = doc.Pages[1].Rect.Height;
doc.Pages[1].MediaBox = new Rectangle(0, 0, h * h / w, h);
doc.Pages[1].CropBox = new Rectangle(0, 0, h * h / w, h);
doc.Save("changed.pdf");
Also, please note that this code will expand the width of the page to fit contents into a new document but makes the width/height ratio equal to the height/width in the original document (i.e., change the orientation of the page). If you need to zoom the document, you can use the PdfPageEditor facade:
[C#]
Document doc = new Document("PdfWithText.pdf");
PdfPageEditor ppe = new PdfPageEditor();
ppe.BindPdf("PdfWithText.pdf");
double w = doc.Pages[1].Rect.Width;
double h = doc.Pages[1].Rect.Height;
float k = (float)(w / h);
ppe.Zoom = k;
ppe.PageSize = new PageSize((float)h, (float)w);
ppe.Save("changed.pdf");
Please feel free to contact us for any further assistance.
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.