diff options
author | James R. Barlow <james@purplerock.ca> | 2022-07-16 15:18:19 -0700 |
---|---|---|
committer | James R. Barlow <james@purplerock.ca> | 2022-07-16 15:18:19 -0700 |
commit | 0ec50197bb3f762cf2825764a83680dac22fb9dc (patch) | |
tree | 137da0fe3d723980508b4a73443c462569175867 /docs | |
parent | c3924e9ba7c6d23506ec1f731212e2d2af355d9a (diff) |
docs: add documentation for Jobs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api/main.rst | 7 | ||||
-rw-r--r-- | docs/tutorial.rst | 22 |
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/api/main.rst b/docs/api/main.rst index 6febc61..e847e40 100644 --- a/docs/api/main.rst +++ b/docs/api/main.rst @@ -213,3 +213,10 @@ but not intended to be created explicitly. dictionary to interpret the image correctly. pikepdf automatically packages inline images into a more useful class, so this will not generally appear. + +Jobs +==== + +.. autoclass:: pikepdf.Job + :members: + :special-members: __init__
\ No newline at end of file diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 6cd0209..3c00f00 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -247,6 +247,28 @@ specify restrictions. Refer to our :ref:`security documentation <security>` for more information on user/owner passwords and PDF permissions. +Running QPDF through Jobs +^^^^^^^^^^^^^^^^^^^^^^^^^ + +pikepdf can access all of the features of the qpdf command line program, and +can even execute qpdf-like command lines. + +.. ipython:: + :verbatim: + + In [1]: from pikepdf import Job + + In [1]: Job(['pikepdf', '--check', '../tests/resources/fourpages.pdf']) + +You can also specify jobs in QPDF Job JSON: + +.. ipython:: + :verbatim: + + In [1]: job_json = {'inputFile': '../tests/resources/fourpages.pdf', 'check': ''} + + In [1]: Job(job_json).run() + Next steps ---------- |