You need to sign in to do that
Don't have an account?

Create PDF displaying null page
I have taken an example to create a PDF from an LWC. From an LWC component I am calling an Aura enabled class. That class passes the HTML using a variable to a visualforce page that renders as a PDF.
In my own development org, I am getting the expected results. However, when I use the exact same code in another sandbox, I am getting a null PDF. I put a debug in the controller for the visualforce page. The debug does not post in the code that is not working. Therefore, it seems that my pagereference is not working.
As I mentioned, the exact code is working in my development org, just not in the sandbox that I copy it to. Any suggestions on why that woudl happen? thanks!!!
In my own development org, I am getting the expected results. However, when I use the exact same code in another sandbox, I am getting a null PDF. I put a debug in the controller for the visualforce page. The debug does not post in the code that is not working. Therefore, it seems that my pagereference is not working.
As I mentioned, the exact code is working in my development org, just not in the sandbox that I copy it to. Any suggestions on why that woudl happen? thanks!!!
Check if have any hardcoded URLs/custom settings/custom labels in your code that might be causing the issue.
If this not the case, can you share the code I can use to reproduce in my org.
If this information helps, please mark the answer as best. Thank you
LWC HTML:
LWC JS:
Apex class called from Javascript:
Visualforce Page used to display and create PDF:
Visualforce Page Controller:
page.getParameters().put('oauth_token', userinfo.getSessionId());
This should work.