Duplicated
Last Updated: 30 Nov 2023 10:29 by ADMIN
Babu
Created on: 21 Oct 2022 08:58
Category: Telerik Document Processing
Type: Bug Report
3
Background and Foreground color for text is not working in PDF by using PDFFormatProvider.

Hi,

We are using HTMLFormatProvider and PDFFormatProvider for converting HTML  string to PDF file.  The below issues are identified while converting PDF.

 

1. Text Foreground  and Background color is not working in pdf.

HTML:

<p><span style="color: rgb(216, 55, 98); background-color: rgb(28, 122, 144); font-size: 30px;">Test</span></p>

We get the same issue even though we added below code.

foreach (Run run in document.EnumerateChildrenOfType<Run>())
{
    if (!run.Properties.HighlightColor.HasLocalValue)
	{
		run.HighlightColor = run.Shading.BackgroundColor.LocalValue;
	}
}

Attached the PDF file 

2. Strikeout is not working in PDF

  Sample HTML:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p><span style="font-size: 24px;"><del>Delete Strike Through line in the paragraph</del></span></p>
</body>
</html>

attached the PDF file .

It would be appreciated , if you provide the solution for those issues

 

Regards,

Babu

 

 

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
6 comments
ADMIN
Yoan
Posted on: 30 Nov 2023 10:29

Hello Babu,

The WordsProcessing HtmlFormatProvider: Provide support for setting color values using rgb() function task is already resolved (as of R2 2023) and you can use the functionality with the latest versions of the Document Processing libraries.

As for the PdfProcessing: Add support for strikethrough text property task, it is still unplanned and there are currently no intentions regarding its implementation. All tasks in the Feedback Portal are automatically prioritized by a system that takes into account factors like complexity and demand which is why some might be delayed even though we are trying our best to resolve them all.

I apologize for the setbacks but the best I can suggest in this case is to subscribe to the task so you can stay updated on its status and to cast your vote in order to impact its priority.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Babu
Posted on: 29 Nov 2023 14:17

Hi,

Any update on this issue.

Hi,

We are using HTMLFormatProvider and PDFFormatProvider for converting HTML  string to PDF file.  The below issues are identified while converting PDF.

 

1. Text Foreground  and Background color is not working in pdf.

HTML:

<p><span style="color: rgb(216, 55, 98); background-color: rgb(28, 122, 144); font-size: 30px;">Test</span></p>

We get the same issue even though we added below code.

foreach (Run run in document.EnumerateChildrenOfType<Run>())
{
    if (!run.Properties.HighlightColor.HasLocalValue)
	{
		run.HighlightColor = run.Shading.BackgroundColor.LocalValue;
	}
}

Attached the PDF file 

Regards.

Babu

 

 

 

 

 

ADMIN
Anna
Posted on: 03 Nov 2022 13:51

Hi,

We are working on improvements on our HTML import and the plan is that they should include the first issue we discussed. That being said, I am not in a position to commit to a timeframe. The second feature is, unfortunately, not scheduled for implementation at this point. Please, once again, accept my apologies for the inconvenience.

Regards,
Anna
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Saminathan
Posted on: 27 Oct 2022 17:12

Hi Anna,

 

When can we get a fix for these issues? They were raised a long time ago. It would be very helpful to us to commit our customer if you provided the tentative date for those issues.

 

Regards,

Babu

 

 

ADMIN
Anna
Posted on: 27 Oct 2022 14:27

Hello,

Let me get straight to your questions.

1. This is a limitation of the HTML import of the WordsProcessing library. You can find the link to the public item here: WordsProcessing HtmlFormatProvider: Provide support for setting color values using rgb() function. The good news is it can be avoided by using a color name, instead of an rgb value. We are currently working on improvements in the HTML import and this limitation should be among those fixed.

2. This is another limitation, this time in the PDF export and you can find the link to the public item here: PdfProcessing: Add support for strikethrough text property.  Unfortunately, I can't offer you a workaround for this at the moment.

Please, accept my apologies for any inconvenience caused.

Regards,
Anna
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Babu
Posted on: 21 Oct 2022 10:11

 

The below code added for verifying the Image alignment.  this is not required for this issue.

We get the same issue even though we added below code.

foreach (Run run in document.EnumerateChildrenOfType<Run>())
{
    if (!run.Properties.HighlightColor.HasLocalValue)
	{
		run.HighlightColor = run.Shading.BackgroundColor.LocalValue;
	}
}