Currently, there is no global way to set default mpdf configuration or temp directory.
Configuration is constant in createMPDF() factory method. You have to create a factory for PDFResponse (and set createMPDF callback) or inherit PDFResponse class and override it or set it for each PDFResponse object
I propose following changes:
Add static variables defaultConfig, defaultTempDir and defaultCreateMPDF which will be used if set. Config will be merged with current default config
Add DI extension to have possibility to set these variables (maybe others like documentAutor) and automatically assign Nette temp dir. This will create dependency on nette/di
I think this can can be implemented without BC and I can create PR.
Currently, there is no global way to set default mpdf configuration or temp directory. Configuration is constant in createMPDF() factory method. You have to create a factory for PDFResponse (and set createMPDF callback) or inherit PDFResponse class and override it or set it for each PDFResponse object
I propose following changes:
I think this can can be implemented without BC and I can create PR.