In many projects, some entities needs to be printed on LANDSCAPE format, others, on PORTRAIT. I was searching for an example or, maybe, a more precise way to implement a page orientation hook, but didn’t really find any. I just need to do something like
if($entity_type = "foo"){ set page orientation to portrait }
On this issue, benjy wrote : If you need to do this programatically, see PrintEvents::CONFIGURATION_ALTER
I looked at the code and saw TestEngineConfigurationAlter class. So I tried to replicate this in a custom module, but it doesn’t seem to do anything. I’m obviously missing a piece of the puzzle and I’m humbly asking for help.
Thank you very much 🙂
Related issues on drupal.org