function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc_beginner7sfdc_beginner7 

Display data of lwc datatable as pdf

I want to display data as pdf that is in my lightning datatable in lwc. These list i am getting from api response . It can range from 10 to 2000 or even more. So I tried below method to pass data to VF page Approach 1 : Passing list as string parameter to VF page URL , but that is hitting my URL limit. Approach 2: Declared get set variable in lwc controller and assigning values on click on print button, but that print blank pdf page .
Approach1: LWC apex controller
  1. Pagereference pageRef = new PageReference('/apex/Locations'); pageRef.getParameters().put('locations',locWrapList); pageRef.getParameters().put('brandName',brandName);
It is giving URL limit error

Approach 2:
  1. lisOfLocation= (List<LocationWrapper>)JSON.deserialize(locWrapList, List<LocationWrapper>.class);
I am using this lisOfLocation in VF page , but on click of print it is printing blank
Is there any way I can handle this
PriyaPriya (Salesforce Developers) 
Hi ,

Can you please take a look on the below article
https://developer.salesforce.com/forums/?id=9060G000000I6bWQAS

Hope this is helpful!

Regards,
Ranjan