Files
ocrmypdf/docs/plugins.rst
T

25 lines
671 B
ReStructuredText
Raw Normal View History

2019-06-22 17:29:26 -07:00
=======
2019-06-20 02:44:29 -07:00
Plugins
=======
2019-06-22 17:29:26 -07:00
You can use plugins to customize the behavior of OCRmyPDF at certain
points of interest.
2019-06-20 02:44:29 -07:00
2019-06-22 17:29:26 -07:00
Currently, it is possible to: - override the decision for whether or not
to perform OCR on a particular file - modify the image is about to be
sent for OCR
2019-06-20 02:44:29 -07:00
How plugins are imported
2019-06-22 17:29:26 -07:00
========================
2019-06-20 02:44:29 -07:00
2019-06-22 17:29:26 -07:00
Plugins are imported on demand, by the OCRmyPDF worker process that
needs to use them. As such, plugins cannot share state with each other,
and will be imported many times, once for each worker process.
2019-06-20 02:44:29 -07:00
Plugins currently cannot override the same hook.
How plugins are invoked
2019-06-22 17:29:26 -07:00
=======================
2019-06-20 02:44:29 -07:00
Plugins may be called from the command line: