in footer via pdfresource.SetHTMLFooter system setting (will be probably resolved with the help of @halftrainedharry )
in the resource content, in non-default context, placeholders doesn’t return anything inside PDF, and settings returns the default context values (for example: ++site_url → default ‘web’ context site_url inside the PDF), the context seems to me ignored inside the PDF output.
Here is the PDF link :
Also when I use the “Create PDF” TV (checked), placeholders are empty and system settings are related to the default “web” context, not the resource context
But when I use the “Create PDF on the fly”, placeholders and site settings (ex: ++site_url) are OK, including my MIGX placeholders.
Regarding the wrong context, you could try if if works, when you move this line
further down (between line 29 and 30), so the creation of the PDF (line 28: $this->pdfresource->createPDF) still happens in the context of the resource (line 18: $this->modx->switchContext($resource->context_key);)
But I’m not sure it that works. I haven’t tested it.
Still not working… May it’s because I use xRouting extra with http_host_aliases (?)
My custom placeholders are set via a snippet using the http host alias (not the context domain).