I don’t see any use case for a function like that. The CSS is tied directly into the template anyway. And the CSS is completely independent of the regular website css and most likely cause issues if you start using a normal wordpress CSS file and don’t optimize it for the pdf print.
But feel free to create a pull request on github if you need a function like that.
Appreciate your response.
I have already implemented this customization successfully, but I’d prefer to not have to manage it as a branch. Had a recent issue where a site that had this deployed auto-updated all their plugins, which caused some havoc.
To your point about the CSS, totally agree. The CSS we are talking about here is only for the pdf print.
Here’s my use case, and you can see if it merits a change – the PDF CSS file is determined via a check of two logic steps:
1) State information for the page (think query string, cookies, etc.).
2) I am storing the physical PDF CSS files in a different location than where WP-MPDF is looking for them. I wanted these integrated into a supporting plugin for ease of management.
I would say that the ability to move the PDF CSS elsewhere is a pretty strong argument to add a filter on the stylesheet. But that’s also because it is part of my reason to customize it, so I’m biased.
Thanks for taking the time to consider this.
Since I don’t have a strong use case for that sort of functionality feel free to re create your change in a branch and create a pull request. I am most willing to review that change and merge it back into the plugin code and release a new version.
I just don’t have the time to implement a feature like that and do proper testing and documentation writing about it in the readme.