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

PDF Rendering in Batch apex does not work



I have a batch apex class which shall generate PDFs and attach them to an object.


However wehenever I run the job, all generated Attachments contain a simple HTML-page which redirects to the login-page of SF. This is the same redirect page which is generated, when one tries to jump to a SF-page but is not yet logged in.


Is that a bug, a missing feature or should it work?


I already figured out that asynchronous methods have the same problem.


any help is appreciated.




I noticed the same issue ... I guess that this is a problem of session context.

I would also be interested if someone found a solution ...