Closed kaystrobach closed 6 years ago
Sure why not. If you want to write a pull request it would i'll be happy to merge.
Do you prefer it as Hook? Iteration over array of closures / anonymous functions or as simple refactoring with the ability to extend and then overload a single function?
Well a simple refactoring is fine with me. But if we really want to advertise this as a feature I guess
public function addProcessor(callable $processor);
is a stronger way to go. If you would be willing to write something like that it would be awsome!
Closing as there seems to be no development. Please reopen if this is still requested!
refactoring https://github.com/hanneskod/libmergepdf/blob/master/src/Merger.php#L152 would make it possible to extend your class more easily, and add custom post processing (e.g. add watermark images, etc.)
So I suggest moving the actual page add operation to a seperated function, which is easier to extend.
This would also raise the readability of the code in the merge function due to less complexity.