Html to pdf for .net alignment issues with arabic in table cells


#1

There are alignment issues with the following elements within the table in the markup below:
in the middle cell

the text wrapped in the is aligned slightly to the left.
In the last cell, the text enclosed by the <span style=‘text-align: right; font-weight: bold;’ is not aligning properly either.

The user style sheet is:
.DisplayBlock {
display: block;
}

.InlineB {
display: inline-block;
}

.EncasingTableContainer {
padding: 1em 0;
}

.EncasingTable {
font-family: ‘Open Sans’, sans-serif;
height: auto;
color: #1a2b57;
border-collapse: collapse;
}

.ContactIcons {
height: 1.25em;
margin: 0 auto;
}

.AvailabilityTableContainer {
display: inline-block;
width: auto;
}

.AvailabilityTable {
margin-right: 0;
margin-left: auto;
border-collapse: collapse;
}

.ContactContainer,
.CareCoordinatorContainer,
.NowPowContainer {
width: 260px;
padding: 0 0.5em;
}

.CareCoordinatorContainer {
text-align: right;
border-right: 2px dashed #e0e0de;
}

.ContactInfoTable td {
text-align: right;
font-size: 10pt;
vertical-align: top;
}

.AvailabilityTable td {
padding-left: 0.5em;
}

.NowPowContainer {
text-align: right;
direction: rtl;
}

.AvailabilityTable .DayCell {
text-align: right;
direction: rtl;
}

.AvailabilityTable .TimeCell {
text-align: right;
width: auto;
}

The html is:

N/A
pedro.olivarez@nowpow.com
5307 S Hyde Park Blvd. Chicago, IL 60615
9:00 AM - 5:00 PM الإثنين
8:15 AM - 2:00 PM الثلاثاء
10:00 AM - 8:00 PM الأربعاء
7:00 AM - 2:15 PM الخميس
10:00 AM - 4:00 PM الجمعة
Health Corner - South
Pedro Olivarez

DEMO ORGANIZATION: Health Corner is a Federally Qualified Health Center dedicated to serving Chicago with outstanding clinical care.Wow bonus quetzal regression text!!!


ربط الرعاية الصحية بالرعاية الذاتية

هى خدمة توفر لك قائمة من الأماكن و البرامج NowPow المجاورة لك والمطابقة لإحتياجاتك الصحية التي يتم تسجيلها من زيارتك لنا اليوم. ومن خلال هذه الخدمات، تستطيع الاستمتاع بحياه مستقلة مع الحفاظ على صحتك ومعالجة أي أمراض قد تعاني منها

Please advise. The alignment is appearing correctly when I run it on any browser.


#2

@NowPow

Thank you for contacting support.

Would you please share source and generated files along with screenshots and narrowed down sample application reproducing this issue as a single zipped file so that we may try to reproduce and investigate it further. Before sharing requested data, please ensure using Aspose.HTML for .NET 18.8 in your environment.


#3

Aspose Support.zip (374.3 KB)


#4

There is an output.html which contains the output string of html the application produces. Borders have been added to the affected area to highlight what is happening. The alignment is fine when the sections don’t have italics or bold applied to them, but mess up when that is added.


#5

@NowPow

Thank you for elaborating it further.

We are unable to use the code shared by you because of some undeclared content. Please share both source HTML files, with and without Bold/Italics, as a zipped file. Along with narrowed down and independent sample project reproducing this issue so that we may try to reproduce and investigate it in our environment.


#6

SupportFiles.zip (982.6 KB)
I’ve attached the files as well as a narrowed down sample project that reproduces the issue. The bold alignment issue doesn’t seem to be present here so I will double check it in my solution. However, the italics issue persists. This solution will write the result to a file within the solution. Please let me know if this will suffice.

Thank you


#7

@NowPow

Thank you for sharing requested data.

We have been able to generate a PDF file with the solution shared by you. Alignment in generated PDF file looks like ExpectedOutput.jpg, even we have tried to use HTML comment tag on line number 182 as well as removing this line but can not notice any change in rendering, although the Arabic characters are broken but you have mentioned alignment issues, whereas the alignment is same as Output.html and Output_NoItalicsOrBold.html file. Kindly elaborate the issue a bit more with the help of screenshots so that we may investigate further to help you out. Generated PDF file has been attached for your kind reference. test_18.8.pdf


#8

If you look at the pdf you sent me you can notice that there is some added white space to the right of the words “Health Corner - South” at the top of the page. This same issue is present for the bold text under the NowPow logo in my solution but it started working when I stripped out some of the html from the body for the narrowed down application. If you would like, I can just pull out the string I’m getting in my solution and hard code the entire thing into the sample so you can see what I’m getting.


#9

@NowPow

Thank you for elaborating it further.

We have been able to notice the issue in our environment. A ticket with ID HTMLNET-1457 has been logged in our issue management system for further investigation and resolution. We will let you know as soon as some significant updates will be available.

We are sorry for the inconvenience.


#10

@NowPow

We are pleased to update you that HTMLNET-1457 has been resolved in Aspose.HTML for .NET 18.10.