PDF Export header cell style

Hello I am trying to add a background color to header cells when exporting to pdf. It does not appear to be doing anything. Attached is the code I am using and the output.





23 Replies 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team January 11, 2022 12:17 PM UTC

Hi Charles, 
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement by setting the “backgroundBrush” property as given below. 
 
exportQueryCellInfo(args: any): void { 
  let backColor = this.grid.pdfExportModule.hexToRgb('#ff0000'); 
 // here you can set the backgroundcolor for header 
  args.cell.style.backgroundBrush = new PdfSolidBrush( 
    new PdfColor(backColor.r, backColor.g, backColor.b) 
  ); 
  } 
 
 
 
Please get back to us if you need further assistance on this. 
 
Regards, 
Pavithra S 



CE Charles Eichelberger January 11, 2022 03:35 PM UTC

Hi,


While this did allow for colors to show up I get a little weird behavior when trying to set different colors for different headers. Some header cells do not receive the background color. It works fine for excel but breaks in pdf. Below is code and output.


Thanks,

Charles



CE Charles Eichelberger January 11, 2022 04:01 PM UTC

If it helps this is what the grid looks like on the site I am trying to get it to look as close as possible in pdf.








PS Pavithra Subramaniyam Syncfusion Team January 12, 2022 02:07 PM UTC

Hi Charles, 

We could face the reported issue while using stacked header in Grid component. For further confirmation could you please confirm whether you are facing any script error while setting style for the pdf Grid header. If yes, please share the details. At the meantime, we are validating this scenario with high priority and will update further details on January 17th , 2022. Until then we appreciate your patience.  
  
Regards,  
Pavithra S 



CE Charles Eichelberger replied to Pavithra Subramaniyam January 12, 2022 02:41 PM UTC

Hi,


I have attached the code I am using for your reference I do not get any error when exporting to pdf.

Thanks,

Charles



Attachment: code_b3abd60e.zip


PS Pavithra Subramaniyam Syncfusion Team January 13, 2022 11:02 AM UTC

Hi Charles, 
 
Thanks for sharing the code. 
 
As we stated previous update, we will validate this scenario at our source and update further details on January 17th, 2022. We appreciate your patience until then. 
 
Regards, 
Pavithra S 



CE Charles Eichelberger replied to Pavithra Subramaniyam January 13, 2022 04:43 PM UTC

Hi,


I appreciate the update and am looking for forward to an update on the 17th.


Thanks,

Charles



SK Sujith Kumar Rajkumar Syncfusion Team January 14, 2022 05:45 AM UTC

Hi Charles, 

We are currently validating the problem from our end and we will provide you the further details by 17th January as promised. 

Regards, 
Sujith R 



PS Pavithra Subramaniyam Syncfusion Team January 18, 2022 12:47 PM UTC

Hi Charles, 
 
Thanks for your patience. 
 
We have validated your query and we have confirmed it as a bug and logged the defect report Wrong grid cell value in pdfHeaderQueryCellInfo event” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and including the defect fix in our weekly release which is expected to be rolled out by the February  2nd , 2022.  
           
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.     
 
 
Regards, 
Pavithra S 


Marked as answer

CE Charles Eichelberger replied to Pavithra Subramaniyam January 18, 2022 02:52 PM UTC

Thank you for the Update!



PS Pavithra Subramaniyam Syncfusion Team January 19, 2022 09:04 AM UTC

Hi Charles, 

You are most welcome! 

Regards, 
Pavithra S  



PS Pavithra Subramaniyam Syncfusion Team February 3, 2022 06:23 AM UTC

Hi Charles, 

Sorry for the inconvenience. 

We have fixed the issue internally, but due to some technical complexities we could not include the fix in our Feb 02, 2022, release. However, the fix will be available in our upcoming patch release on Feb 09th, 2022. Until then we appreciate your patience. 

Regards, 
Pavithra S  



RS Rajapandiyan Settu Syncfusion Team February 10, 2022 12:54 PM UTC

Hi Charles,   
   
We deeply regret inconvenience caused.   
    
We have fixed the issue internally, But due to some unforeseen circumstances, the fix of this issue (“Wrong grid cell value in pdfHeaderQueryCellInfo event”) was not included in our weekly patch release (v19.4.50). Currently, we are working on this with high priority and will include the fix in our next weekly release Feb 16th, 2022. 
  
We will update you once the fix is rolled out. Until then, we appreciate your patience.   
   
Regards,   
Rajapandiyan S  



PS Pavithra Subramaniyam Syncfusion Team February 18, 2022 05:12 AM UTC

Hi Charles,   

Thanks for your patience.  

We are glad to announce that we have added the fix for the issue –“ Wrong grid cell value in pdfHeaderQueryCellInfo event” in our patch release (v19.4.52). So please update your packages to latest version to include the fix.  

 
We thank you for your support and appreciate your patience in waiting for this release. Please contact us if you would require any further assistance.  

Regards,  
Pavithra S  



CE Charles Eichelberger replied to Pavithra Subramaniyam February 18, 2022 07:15 PM UTC

Hi,


Upgrading does appear to fix the background color but the text color still is wrong. Some but not all Header cells text is red. They should all be red.




Thanks,

Charles 




PS Pavithra Subramaniyam Syncfusion Team February 21, 2022 01:52 PM UTC

Hi Charles, 
 
We could reproduce the case at our end while customizing the text color inside the pdfHeaderQueryCellInfo event. Currently we are checking the root cause for this scenario at our side and will update more details on Feb 23rd, 2022. Until then we appreciate your patience. 
 
Regards, 
Pavithra S 



PS Pavithra Subramaniyam Syncfusion Team February 23, 2022 11:48 AM UTC

Hi Charles, 

Thanks for your patience.  
  
We have confirmed this as an issue and logged the defect report “Pdf grid header text color is not updated properly” for the same. Thank you for taking time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the fix in our upcoming weekly patch release which is expected to be rolled out by March 09th, 2022.  
          
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.          
  
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization. The feedback is under review process and it will be visible once the review is done. 
  
Regards,  
Pavithra S 



PS Pavithra Subramaniyam Syncfusion Team March 10, 2022 12:08 PM UTC

Hi Charles, 

Sorry for the inconvenience caused. 

Due to some technical complexities, we could not add the fix in our March 08, patch release. However, we will include it in our March 16th, 2022, patch release. We will let you know once the patch is rolled out. Until then we appreciate your patience. 

Regards, 
Pavithra S 



CE Charles Eichelberger replied to Pavithra Subramaniyam March 19, 2022 11:28 PM UTC

Awesome thank you for the update.






PS Pavithra Subramaniyam Syncfusion Team March 21, 2022 02:01 PM UTC

Hi Charles, 
 
We have fixed the issue internally, but due to the technical glitch still we could not add the fix in our March 16th patch release and expecting the fix to be included in our patch release April 1st week. We will let you know once it is rolled out. Until then, appreciate your patience. We regret for the inconvenience. 
 
Regards, 
Pavithra S 



PS Pavithra Subramaniyam Syncfusion Team April 8, 2022 07:54 AM UTC

Hi Charles,


Thanks for your patience. 


We are glad to announce that our Essential Studio 2022 Volume 1 release v20.1.0.47 is rolled out and is available for download under the following link.


Essential Studio 2022 Volume 1 Main Release v20.1.0.47 is available for download | Announcements Forums | Syncfusion


In this release we have included the fix for the issue “Pdf grid header text color is not updated properly”.


https://www.syncfusion.com/feedback/32940/pdf-grid-header-text-color-is-not-updated-properly


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,          

Pavithra S



CE Charles Eichelberger replied to Pavithra Subramaniyam April 8, 2022 03:19 PM UTC

I can confirm everything is working now thank you so much!



PS Pavithra Subramaniyam Syncfusion Team April 11, 2022 04:48 AM UTC

Hi Charles,


It is great to hear that everything is working now!


Please get back to us if you need any further assistance. We are always happy to assist you!


Regards,

Pavithra S


Loader.
Up arrow icon