Format issues while converting

Hi,


I am having format issues when I convert my html to pdf. The table puts unnecessary column lines, fonts are changed and spacing is not correct. The html is rendered correct by browser. Here is snippet of what I have:

.Net code:
if (String.IsNullOrEmpty(htmlStr.Trim()))

GetPDFLicense();

htmlStr = htmlStr.Replace("", "&"); (// is this necessary)

Aspose.Pdf.Generator.Pdf pdf1 = new Pdf();

Aspose.Pdf.Generator.Section section = pdf1.Sections.Add();

Text text2 = new Text(section, htmlStr);

text2.IsHtmlTagSupported = true;

section.Paragraphs.Add(text2);

this.Context.Response.ContentType = "application/pdf";

pdf1.Save(this.Context.Response.OutputStream);

Here is a snippet of my HTML :

html, body {

width:100%;

font-family:Arial, Helvetica, sans-serif;

}


table {

width:650px;

border:1px solid #000;

}

.header {

background-color:#ccc;

text-align:center;

padding:2px;

font-size:12px;

font-weight:bold;

}

/style>
Exibit B
Erin Test 2-25
Customer Name:FIBERTOWER ATC
Asset
Name:CRYSTAL MOUNTAIN ATC
Asset
#:88768 
GROUND SPACE REQUIREMENTS
Total Lease AreaSq. Ft.240.0 Primary Contiguous Lease Area L:12.0 W:20.0 H: Sq. Ft:240.0

But it seems when the pdf is rendered the styles I defined are ignored. Is there any way/flag to force it.


Hi Jignesh,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

I used your provided code and attached is the generated PDF file. There are formatting issues in the PDF file. Please confirm if you are getting the same kind of output. If not, please share your output PDF file with us. Also, in your code, you are missing “<” in the closing tag of style. Also, I have moved your Style code under the tag to generate the resultant file. Please share your output with us as this will help us further look into the issue and rectify it.

Sorry for the inconvenience,

Hi,


Thanks for the quick reply. I might have missed the html “<” in copy/paste. I am attaching my html(as txt file, as it does not let me upload a html file) and also the generated pdf I get. You will notice several issues, font size not getting styled, tables having un-necessary columns, data not getting centered etc.

thanks

Hi Jignesh,

Thank you for sharing the template document. I tested the scenario and able to notice the same problem. For rectification, I logged this problem with ID: PDFNEWNET-33333 in our Issue Tracking System. We will further look into the details of this issue and will keep you updated via this forum thread on the status of correction.

We apologize for your inconvenience.

Thanks & Regards,

Thanks for the quick diagnosis. Looking forward to the resolution. We are going to release in 2 months. Hopefully we get a solution by that time.


regards
Is there a timeline for this fix. We have a release scheduled next month and it would be nice to have this issue resolved.


Hi Jignesh,

Thank you for being patient.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have requested the development team to share an ETA regarding the resolution of the issue. As soon as I get a response, I will update you via this forum thread.

Sorry for the inconvenience,

Hi,


Any update on the ETA for resolution. Our release date is coming near.

regards

Hi Jignesh,

Thanks for your patience.

I have verified the status of this issue from our issue tracking system and regret to share that this issue is still unresolved. Currently it is pending for analysis and is in the queue. Also, at the moment we can't provide you the ETA for this issue. However, I have notified the development team of your concern. As soon as, any information is shared by them, we will be more than happy to share that with you.

We are really sorry for the delay and inconvenience.

Thanks & Regards,

Hi Jignesh,

Thank you for your patience.

I am very pleased to inform you that the issue is resolved by the development team and this issue will be a part of Aspose.Pdf for .NET v7.2 (to be released in August as per our monthly release plan) after following the complete testing and release cycle. Please be patient and we will notify you once the version is available for download.

We apologize for your inconvenience.

Thanks & Regards,

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


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

Hi Jignesh


Thanks for your patience. Please note your above reported issue has been fixed in new DOM approach for HTML to PDF conversion. Please check following documentation link for the details. It will help you to accomplish the task.


Please feel free to contact us for any further assistance.

Best Regards,