pdftl 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pdftl-0.7.0/.readthedocs.yaml +25 -0
- pdftl-0.7.0/CHANGELOG.md +220 -0
- pdftl-0.7.0/LICENSE +373 -0
- pdftl-0.7.0/MANIFEST.in +47 -0
- pdftl-0.7.0/NOTICE.md +35 -0
- pdftl-0.7.0/PKG-INFO +336 -0
- pdftl-0.7.0/README.md +262 -0
- pdftl-0.7.0/docs/Makefile +19 -0
- pdftl-0.7.0/docs/api_tutorial.md +138 -0
- pdftl-0.7.0/docs/common.py +103 -0
- pdftl-0.7.0/docs/generate_md_docs.py +171 -0
- pdftl-0.7.0/docs/sphinx-conf.py +13 -0
- pdftl-0.7.0/pyproject.toml +168 -0
- pdftl-0.7.0/setup.cfg +4 -0
- pdftl-0.7.0/src/pdftl/__init__.py +50 -0
- pdftl-0.7.0/src/pdftl/__main__.py +16 -0
- pdftl-0.7.0/src/pdftl/_version.py +34 -0
- pdftl-0.7.0/src/pdftl/api.py +287 -0
- pdftl-0.7.0/src/pdftl/api.pyi +54 -0
- pdftl-0.7.0/src/pdftl/cli/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/cli/console.py +23 -0
- pdftl-0.7.0/src/pdftl/cli/constants.py +12 -0
- pdftl-0.7.0/src/pdftl/cli/help.py +426 -0
- pdftl-0.7.0/src/pdftl/cli/help_data.py +132 -0
- pdftl-0.7.0/src/pdftl/cli/main.py +176 -0
- pdftl-0.7.0/src/pdftl/cli/parser.py +330 -0
- pdftl-0.7.0/src/pdftl/cli/pipeline.py +461 -0
- pdftl-0.7.0/src/pdftl/cli/whoami.py +11 -0
- pdftl-0.7.0/src/pdftl/core/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/core/constants.py +317 -0
- pdftl-0.7.0/src/pdftl/core/executor.py +73 -0
- pdftl-0.7.0/src/pdftl/core/registry.py +206 -0
- pdftl-0.7.0/src/pdftl/core/types.py +180 -0
- pdftl-0.7.0/src/pdftl/exceptions.py +43 -0
- pdftl-0.7.0/src/pdftl/fluent.py +151 -0
- pdftl-0.7.0/src/pdftl/fluent.pyi +66 -0
- pdftl-0.7.0/src/pdftl/info/info_types.py +248 -0
- pdftl-0.7.0/src/pdftl/info/output_info.py +247 -0
- pdftl-0.7.0/src/pdftl/info/parse_dump.py +196 -0
- pdftl-0.7.0/src/pdftl/info/read_info.py +117 -0
- pdftl-0.7.0/src/pdftl/info/set_info.py +209 -0
- pdftl-0.7.0/src/pdftl/operations/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/operations/add_text.py +344 -0
- pdftl-0.7.0/src/pdftl/operations/attachments.py +213 -0
- pdftl-0.7.0/src/pdftl/operations/burst.py +100 -0
- pdftl-0.7.0/src/pdftl/operations/cat.py +88 -0
- pdftl-0.7.0/src/pdftl/operations/chop.py +238 -0
- pdftl-0.7.0/src/pdftl/operations/crop.py +211 -0
- pdftl-0.7.0/src/pdftl/operations/delete.py +62 -0
- pdftl-0.7.0/src/pdftl/operations/delete_annots.py +55 -0
- pdftl-0.7.0/src/pdftl/operations/dump_annots.py +274 -0
- pdftl-0.7.0/src/pdftl/operations/dump_data.py +276 -0
- pdftl-0.7.0/src/pdftl/operations/dump_data_fields.py +432 -0
- pdftl-0.7.0/src/pdftl/operations/dump_dests.py +202 -0
- pdftl-0.7.0/src/pdftl/operations/dump_layers.py +189 -0
- pdftl-0.7.0/src/pdftl/operations/dump_signatures.py +151 -0
- pdftl-0.7.0/src/pdftl/operations/dump_text.py +98 -0
- pdftl-0.7.0/src/pdftl/operations/fill_form.py +253 -0
- pdftl-0.7.0/src/pdftl/operations/filter.py +81 -0
- pdftl-0.7.0/src/pdftl/operations/generate_fdf.py +147 -0
- pdftl-0.7.0/src/pdftl/operations/helpers/crop_fit.py +220 -0
- pdftl-0.7.0/src/pdftl/operations/helpers/text_drawer.py +272 -0
- pdftl-0.7.0/src/pdftl/operations/inject.py +100 -0
- pdftl-0.7.0/src/pdftl/operations/insert.py +196 -0
- pdftl-0.7.0/src/pdftl/operations/modify_annots.py +256 -0
- pdftl-0.7.0/src/pdftl/operations/move.py +146 -0
- pdftl-0.7.0/src/pdftl/operations/normalize.py +67 -0
- pdftl-0.7.0/src/pdftl/operations/optimize_images.py +309 -0
- pdftl-0.7.0/src/pdftl/operations/overlay.py +165 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/add_text_parser.py +598 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/chop_parser.py +296 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/crop_parser.py +174 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/inject_parser.py +53 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/insert_parser.py +79 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/modify_annots_parser.py +149 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/move_parser.py +46 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/place_parser.py +124 -0
- pdftl-0.7.0/src/pdftl/operations/parsers/update_info_parser.py +18 -0
- pdftl-0.7.0/src/pdftl/operations/place.py +284 -0
- pdftl-0.7.0/src/pdftl/operations/render.py +164 -0
- pdftl-0.7.0/src/pdftl/operations/replace.py +141 -0
- pdftl-0.7.0/src/pdftl/operations/rotate.py +71 -0
- pdftl-0.7.0/src/pdftl/operations/shuffle.py +102 -0
- pdftl-0.7.0/src/pdftl/operations/types/info_types.py +50 -0
- pdftl-0.7.0/src/pdftl/operations/types/insert_types.py +17 -0
- pdftl-0.7.0/src/pdftl/operations/types/move_types.py +15 -0
- pdftl-0.7.0/src/pdftl/operations/update_info.py +248 -0
- pdftl-0.7.0/src/pdftl/output/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/output/attach.py +368 -0
- pdftl-0.7.0/src/pdftl/output/dump.py +18 -0
- pdftl-0.7.0/src/pdftl/output/flatten.py +88 -0
- pdftl-0.7.0/src/pdftl/output/save.py +401 -0
- pdftl-0.7.0/src/pdftl/output/sign.py +329 -0
- pdftl-0.7.0/src/pdftl/pages/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/pages/action_handlers.py +48 -0
- pdftl-0.7.0/src/pdftl/pages/add_pages.py +260 -0
- pdftl-0.7.0/src/pdftl/pages/link_remapper.py +412 -0
- pdftl-0.7.0/src/pdftl/pages/links.py +245 -0
- pdftl-0.7.0/src/pdftl/pages/outlines.py +276 -0
- pdftl-0.7.0/src/pdftl/py.typed +0 -0
- pdftl-0.7.0/src/pdftl/registry_init.py +120 -0
- pdftl-0.7.0/src/pdftl/utils/__init__.py +0 -0
- pdftl-0.7.0/src/pdftl/utils/affix_content.py +15 -0
- pdftl-0.7.0/src/pdftl/utils/arg_helpers.py +110 -0
- pdftl-0.7.0/src/pdftl/utils/dependencies.py +38 -0
- pdftl-0.7.0/src/pdftl/utils/destinations.py +75 -0
- pdftl-0.7.0/src/pdftl/utils/dimensions.py +60 -0
- pdftl-0.7.0/src/pdftl/utils/fdf.py +97 -0
- pdftl-0.7.0/src/pdftl/utils/hooks.py +86 -0
- pdftl-0.7.0/src/pdftl/utils/io_helpers.py +50 -0
- pdftl-0.7.0/src/pdftl/utils/json.py +214 -0
- pdftl-0.7.0/src/pdftl/utils/normalize.py +36 -0
- pdftl-0.7.0/src/pdftl/utils/page_specs.py +660 -0
- pdftl-0.7.0/src/pdftl/utils/scale.py +50 -0
- pdftl-0.7.0/src/pdftl/utils/string.py +219 -0
- pdftl-0.7.0/src/pdftl/utils/transform.py +142 -0
- pdftl-0.7.0/src/pdftl/utils/type_helpers.py +43 -0
- pdftl-0.7.0/src/pdftl/utils/user_input.py +108 -0
- pdftl-0.7.0/src/pdftl/utils/whatisit.py +63 -0
- pdftl-0.7.0/src/pdftl.egg-info/PKG-INFO +336 -0
- pdftl-0.7.0/src/pdftl.egg-info/SOURCES.txt +289 -0
- pdftl-0.7.0/src/pdftl.egg-info/dependency_links.txt +1 -0
- pdftl-0.7.0/src/pdftl.egg-info/entry_points.txt +2 -0
- pdftl-0.7.0/src/pdftl.egg-info/requires.txt +59 -0
- pdftl-0.7.0/src/pdftl.egg-info/top_level.txt +1 -0
- pdftl-0.7.0/tests/__init__.py +0 -0
- pdftl-0.7.0/tests/api/__init__.py +0 -0
- pdftl-0.7.0/tests/api/test_api_basics.py +86 -0
- pdftl-0.7.0/tests/api/test_api_bridge.py +72 -0
- pdftl-0.7.0/tests/api/test_api_coverage.py +140 -0
- pdftl-0.7.0/tests/api/test_api_coverage_more.py +75 -0
- pdftl-0.7.0/tests/api/test_api_logic_coverage.py +97 -0
- pdftl-0.7.0/tests/api/test_api_registry_examples.py +112 -0
- pdftl-0.7.0/tests/api/test_doc_examples.py +81 -0
- pdftl-0.7.0/tests/api/test_exception_translation.py +44 -0
- pdftl-0.7.0/tests/api/test_fluent.py +86 -0
- pdftl-0.7.0/tests/api/test_fluent_coverage.py +173 -0
- pdftl-0.7.0/tests/api/test_reboot.py +86 -0
- pdftl-0.7.0/tests/api/test_stub_gen.py +110 -0
- pdftl-0.7.0/tests/api/test_stubs_mypy.py +112 -0
- pdftl-0.7.0/tests/assets/meta.txt +20 -0
- pdftl-0.7.0/tests/assets/signing/ca_cert.pem +19 -0
- pdftl-0.7.0/tests/assets/signing/ca_key.pem +28 -0
- pdftl-0.7.0/tests/assets/signing/full_chain.pem +39 -0
- pdftl-0.7.0/tests/assets/signing/test.csr +15 -0
- pdftl-0.7.0/tests/assets/signing/test_cert.pem +19 -0
- pdftl-0.7.0/tests/assets/signing/test_ext.cnf +12 -0
- pdftl-0.7.0/tests/assets/signing/test_key.pem +28 -0
- pdftl-0.7.0/tests/cli/test_cli_regressions.py +3 -0
- pdftl-0.7.0/tests/cli/test_help.py +225 -0
- pdftl-0.7.0/tests/cli/test_help_coverage.py +91 -0
- pdftl-0.7.0/tests/cli/test_help_coverage2.py +61 -0
- pdftl-0.7.0/tests/cli/test_main.py +325 -0
- pdftl-0.7.0/tests/cli/test_parser.py +494 -0
- pdftl-0.7.0/tests/cli/test_parser_coverage_2.py +124 -0
- pdftl-0.7.0/tests/cli/test_pipeline.py +290 -0
- pdftl-0.7.0/tests/cli/test_pipeline_coverage.py +354 -0
- pdftl-0.7.0/tests/cli/test_pipeline_extra.py +93 -0
- pdftl-0.7.0/tests/comparison_helpers.py +65 -0
- pdftl-0.7.0/tests/conftest.py +603 -0
- pdftl-0.7.0/tests/core/test_architecture.py +56 -0
- pdftl-0.7.0/tests/core/test_executor.py +100 -0
- pdftl-0.7.0/tests/core/test_executor_hardening.py +82 -0
- pdftl-0.7.0/tests/core/test_magic_strings_audit.py +85 -0
- pdftl-0.7.0/tests/core/test_registry.py +121 -0
- pdftl-0.7.0/tests/core/test_registry_coverage.py +86 -0
- pdftl-0.7.0/tests/create_pdf.py +86 -0
- pdftl-0.7.0/tests/create_pdf2.py +84 -0
- pdftl-0.7.0/tests/info/test_info_types.py +325 -0
- pdftl-0.7.0/tests/info/test_output_info.py +548 -0
- pdftl-0.7.0/tests/info/test_parse_dump.py +397 -0
- pdftl-0.7.0/tests/info/test_read_info.py +270 -0
- pdftl-0.7.0/tests/info/test_read_info_hypothesis.py +226 -0
- pdftl-0.7.0/tests/info/test_set_info.py +469 -0
- pdftl-0.7.0/tests/operations/__init__.py +0 -0
- pdftl-0.7.0/tests/operations/helpers/test_crop_fit.py +312 -0
- pdftl-0.7.0/tests/operations/helpers/test_text_drawer.py +204 -0
- pdftl-0.7.0/tests/operations/helpers/test_text_drawer_coverage.py +312 -0
- pdftl-0.7.0/tests/operations/helpers/test_text_drawer_hypothesis.py +94 -0
- pdftl-0.7.0/tests/operations/parsers/test_add_text_parser.py +670 -0
- pdftl-0.7.0/tests/operations/parsers/test_add_text_parser_coverage.py +410 -0
- pdftl-0.7.0/tests/operations/parsers/test_chop_parser.py +363 -0
- pdftl-0.7.0/tests/operations/parsers/test_chop_parser_hypothesis.py +244 -0
- pdftl-0.7.0/tests/operations/parsers/test_crop_parser.py +126 -0
- pdftl-0.7.0/tests/operations/parsers/test_crop_parser_coverage.py +60 -0
- pdftl-0.7.0/tests/operations/parsers/test_crop_parser_hypothesis.py +159 -0
- pdftl-0.7.0/tests/operations/parsers/test_inject_parser.py +138 -0
- pdftl-0.7.0/tests/operations/parsers/test_inject_parser_hypothesis.py +110 -0
- pdftl-0.7.0/tests/operations/parsers/test_modify_annots_parser.py +230 -0
- pdftl-0.7.0/tests/operations/parsers/test_move_parser.py +12 -0
- pdftl-0.7.0/tests/operations/parsers/test_place_parser.py +100 -0
- pdftl-0.7.0/tests/operations/sandbox.py +32 -0
- pdftl-0.7.0/tests/operations/test_add_text.py +191 -0
- pdftl-0.7.0/tests/operations/test_add_text_coverage.py +109 -0
- pdftl-0.7.0/tests/operations/test_attachments.py +69 -0
- pdftl-0.7.0/tests/operations/test_attachments_coverage.py +97 -0
- pdftl-0.7.0/tests/operations/test_burst.py +96 -0
- pdftl-0.7.0/tests/operations/test_chop.py +30 -0
- pdftl-0.7.0/tests/operations/test_crop_coverage.py +163 -0
- pdftl-0.7.0/tests/operations/test_delete_annots.py +36 -0
- pdftl-0.7.0/tests/operations/test_dump_annots.py +190 -0
- pdftl-0.7.0/tests/operations/test_dump_data.py +67 -0
- pdftl-0.7.0/tests/operations/test_dump_data_fields.py +40 -0
- pdftl-0.7.0/tests/operations/test_dump_data_fields_coverage.py +200 -0
- pdftl-0.7.0/tests/operations/test_dump_dests.py +321 -0
- pdftl-0.7.0/tests/operations/test_dump_dests_hypothesis.py +400 -0
- pdftl-0.7.0/tests/operations/test_dump_layers.py +178 -0
- pdftl-0.7.0/tests/operations/test_dump_signatures.py +238 -0
- pdftl-0.7.0/tests/operations/test_dump_text_coverage.py +59 -0
- pdftl-0.7.0/tests/operations/test_dumps.py +58 -0
- pdftl-0.7.0/tests/operations/test_fill_form_coverage.py +124 -0
- pdftl-0.7.0/tests/operations/test_fill_form_xfdf.py +597 -0
- pdftl-0.7.0/tests/operations/test_filter.py +26 -0
- pdftl-0.7.0/tests/operations/test_forms.py +109 -0
- pdftl-0.7.0/tests/operations/test_forms_coverage.py +158 -0
- pdftl-0.7.0/tests/operations/test_generate_fdf.py +270 -0
- pdftl-0.7.0/tests/operations/test_inject.py +74 -0
- pdftl-0.7.0/tests/operations/test_insert.py +200 -0
- pdftl-0.7.0/tests/operations/test_misc_commands.py +118 -0
- pdftl-0.7.0/tests/operations/test_misc_coverage.py +138 -0
- pdftl-0.7.0/tests/operations/test_modify_annots.py +379 -0
- pdftl-0.7.0/tests/operations/test_modify_annots_coverage.py +64 -0
- pdftl-0.7.0/tests/operations/test_modify_annots_coverage_2.py +154 -0
- pdftl-0.7.0/tests/operations/test_move.py +215 -0
- pdftl-0.7.0/tests/operations/test_multidoc.py +105 -0
- pdftl-0.7.0/tests/operations/test_normalize_command.py +57 -0
- pdftl-0.7.0/tests/operations/test_optimize_images_complete.py +119 -0
- pdftl-0.7.0/tests/operations/test_overlay.py +20 -0
- pdftl-0.7.0/tests/operations/test_place.py +101 -0
- pdftl-0.7.0/tests/operations/test_place_coverage.py +158 -0
- pdftl-0.7.0/tests/operations/test_place_math.py +70 -0
- pdftl-0.7.0/tests/operations/test_render.py +242 -0
- pdftl-0.7.0/tests/operations/test_replace.py +166 -0
- pdftl-0.7.0/tests/operations/test_rotate.py +33 -0
- pdftl-0.7.0/tests/operations/test_shuffle.py +17 -0
- pdftl-0.7.0/tests/operations/test_simple_transforms.py +43 -0
- pdftl-0.7.0/tests/operations/test_update_info.py +98 -0
- pdftl-0.7.0/tests/operations/test_update_info_at_file.py +107 -0
- pdftl-0.7.0/tests/operations/test_update_info_coverage.py +69 -0
- pdftl-0.7.0/tests/output/test_attach.py +310 -0
- pdftl-0.7.0/tests/output/test_attach_hypothesis.py +135 -0
- pdftl-0.7.0/tests/output/test_flatten.py +116 -0
- pdftl-0.7.0/tests/output/test_save.py +614 -0
- pdftl-0.7.0/tests/output/test_save_extra.py +254 -0
- pdftl-0.7.0/tests/output/test_sign.py +124 -0
- pdftl-0.7.0/tests/output/test_sign2.py +156 -0
- pdftl-0.7.0/tests/pages/test_action_handlers.py +120 -0
- pdftl-0.7.0/tests/pages/test_add_pages.py +435 -0
- pdftl-0.7.0/tests/pages/test_link_remapper.py +546 -0
- pdftl-0.7.0/tests/pages/test_links.py +560 -0
- pdftl-0.7.0/tests/pages/test_outlines.py +486 -0
- pdftl-0.7.0/tests/pages/test_pages_integration.py +174 -0
- pdftl-0.7.0/tests/scripts/generate_form.py +115 -0
- pdftl-0.7.0/tests/test_annots.py +211 -0
- pdftl-0.7.0/tests/test_cli.py +161 -0
- pdftl-0.7.0/tests/test_cov.py +68 -0
- pdftl-0.7.0/tests/test_examples.py +179 -0
- pdftl-0.7.0/tests/test_harness.py +123 -0
- pdftl-0.7.0/tests/test_init.py +36 -0
- pdftl-0.7.0/tests/test_lazy_imports.py +81 -0
- pdftl-0.7.0/tests/test_meta_harness.py +78 -0
- pdftl-0.7.0/tests/test_page_spec.py +145 -0
- pdftl-0.7.0/tests/test_php_compat.py +127 -0
- pdftl-0.7.0/tests/test_registry_init.py +139 -0
- pdftl-0.7.0/tests/test_registry_init_external.py +189 -0
- pdftl-0.7.0/tests/test_suite_1.py +122 -0
- pdftl-0.7.0/tests/test_types.py +44 -0
- pdftl-0.7.0/tests/test_version.py +25 -0
- pdftl-0.7.0/tests/utils/test_affix_content.py +17 -0
- pdftl-0.7.0/tests/utils/test_arg_helpers.py +163 -0
- pdftl-0.7.0/tests/utils/test_dependencies.py +24 -0
- pdftl-0.7.0/tests/utils/test_destinations.py +159 -0
- pdftl-0.7.0/tests/utils/test_dimensions.py +46 -0
- pdftl-0.7.0/tests/utils/test_fdf.py +216 -0
- pdftl-0.7.0/tests/utils/test_hooks.py +120 -0
- pdftl-0.7.0/tests/utils/test_io_helpers.py +18 -0
- pdftl-0.7.0/tests/utils/test_io_helpers2.py +99 -0
- pdftl-0.7.0/tests/utils/test_json.py +256 -0
- pdftl-0.7.0/tests/utils/test_normalize_util.py +90 -0
- pdftl-0.7.0/tests/utils/test_page_specs.py +501 -0
- pdftl-0.7.0/tests/utils/test_page_specs_coverage.py +67 -0
- pdftl-0.7.0/tests/utils/test_scale.py +149 -0
- pdftl-0.7.0/tests/utils/test_string.py +376 -0
- pdftl-0.7.0/tests/utils/test_transform.py +226 -0
- pdftl-0.7.0/tests/utils/test_user_input.py +180 -0
- pdftl-0.7.0/tests/utils.py +19 -0
- pdftl-0.7.0/tests/vendor/test_compatability_forms.py +94 -0
- pdftl-0.7.0/tools/api_stub_gen.py +100 -0
- pdftl-0.7.0/tools/dropbox-ignore.sh +77 -0
- pdftl-0.7.0/tools/install_php_ci_prereqs.sh +76 -0
- pdftl-0.7.0/tools/setup_php_tests.sh +25 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# readthedocs.yaml
|
|
2
|
+
|
|
3
|
+
version: 2
|
|
4
|
+
|
|
5
|
+
build:
|
|
6
|
+
os: ubuntu-lts-latest
|
|
7
|
+
tools:
|
|
8
|
+
python: "3.10"
|
|
9
|
+
jobs:
|
|
10
|
+
pre_build:
|
|
11
|
+
- cd docs && make html
|
|
12
|
+
|
|
13
|
+
sphinx:
|
|
14
|
+
configuration: docs/source/conf.py
|
|
15
|
+
|
|
16
|
+
formats:
|
|
17
|
+
- pdf
|
|
18
|
+
- epub
|
|
19
|
+
|
|
20
|
+
python:
|
|
21
|
+
install:
|
|
22
|
+
- method: pip
|
|
23
|
+
path: .
|
|
24
|
+
extra_requirements:
|
|
25
|
+
- docs
|
pdftl-0.7.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
|
|
6
|
+
<!-- Posible headings: Added, Changed, Deprecated, Fixed, Removed, Security -->
|
|
7
|
+
|
|
8
|
+
## [0.7.0] - 2026-01-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- automated `pdftk` compatibility testing using third party
|
|
13
|
+
php test suite.
|
|
14
|
+
|
|
15
|
+
- `drop_xfa` output option to drop XFA form data (pdftk compatibility)
|
|
16
|
+
|
|
17
|
+
- `render` operation: rasterize pages
|
|
18
|
+
|
|
19
|
+
- `move`, `update_info`, `update_info_utf8` now accept
|
|
20
|
+
instructions from a JSON "at-file" using `@filename.json`
|
|
21
|
+
in place of CLI arguments
|
|
22
|
+
|
|
23
|
+
- `dump_data` gives JSON output via the `json` keyword
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- bug in `add_pages.py` when a page has an integer key-value
|
|
28
|
+
|
|
29
|
+
- more comprehensive handling of the five PDF page boxes for
|
|
30
|
+
`dump_data` and `update_info`
|
|
31
|
+
|
|
32
|
+
- `drop_info` and `drop_xmp` output options should now work
|
|
33
|
+
as claimed
|
|
34
|
+
|
|
35
|
+
- `flatten` reimplemented for robustness
|
|
36
|
+
|
|
37
|
+
## [0.6.0] - 2026-01-04
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- `move` operation: move pages within a PDF file
|
|
42
|
+
|
|
43
|
+
- `place` operation: shift, scale and/or spin content within
|
|
44
|
+
the page
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Now handles compound page specifications like `1,3-4,7-end`
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Improved API documentation generation
|
|
53
|
+
|
|
54
|
+
### Removed
|
|
55
|
+
|
|
56
|
+
- `spin` operation. See `place` for this functionality.
|
|
57
|
+
|
|
58
|
+
## [0.5.0] - 2026-01-03
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- `add_text` features:
|
|
63
|
+
|
|
64
|
+
- source metadata variables (`source_filename`,
|
|
65
|
+
`source_page`, etc)
|
|
66
|
+
|
|
67
|
+
- Bates stamping variable features,
|
|
68
|
+
e.g. `DEF-{page+120:06d}` produces DEF-000121, DEF-000122,
|
|
69
|
+
...
|
|
70
|
+
|
|
71
|
+
- `insert` operation: insert blank pages
|
|
72
|
+
|
|
73
|
+
## [0.4.1] - 2026-01-02
|
|
74
|
+
|
|
75
|
+
### Fixed
|
|
76
|
+
|
|
77
|
+
- Broken link in README.md
|
|
78
|
+
|
|
79
|
+
## [0.4.0] - 2026-01-01
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
|
|
83
|
+
- API with fluent and functional interfaces
|
|
84
|
+
- `docs/api_tutorial.md` and auto-generated API docs
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
|
|
88
|
+
- Renamed operation: `list_files` is now `dump_files`
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
|
|
92
|
+
- Fixed bug preventing parsing of the page specification "right"
|
|
93
|
+
|
|
94
|
+
## [0.3.1] - 2025-12-20
|
|
95
|
+
|
|
96
|
+
### Fixed
|
|
97
|
+
|
|
98
|
+
- `README.md` corrected, and "platform" badge added
|
|
99
|
+
|
|
100
|
+
## [0.3.0] - 2025-12-20
|
|
101
|
+
|
|
102
|
+
### Added
|
|
103
|
+
|
|
104
|
+
- Get `help` by tag with `pdftl help tag:<tagname>`
|
|
105
|
+
|
|
106
|
+
- `dump_signatures`: view and validate PDF signatures
|
|
107
|
+
|
|
108
|
+
- PDF signature output options:
|
|
109
|
+
|
|
110
|
+
- `sign_cert <file>` Path to certificate PEM
|
|
111
|
+
|
|
112
|
+
- `sign_field <name>` Signature field name (default: Signature1)
|
|
113
|
+
|
|
114
|
+
- `sign_key <file>` Path to private key PEM
|
|
115
|
+
|
|
116
|
+
- `sign_pass_env <var>` Environment variable with sign_cert passphrase
|
|
117
|
+
|
|
118
|
+
- `sign_pass_prompt` Prompt for sign_cert passphrase
|
|
119
|
+
|
|
120
|
+
- `dump_layers`: dump PDF optional content groups (OCGs), a.k.a. "layers"
|
|
121
|
+
|
|
122
|
+
### Fixed
|
|
123
|
+
|
|
124
|
+
- performance improvements for `cat`
|
|
125
|
+
|
|
126
|
+
## [0.2.1] - 2025-12-17
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
|
|
130
|
+
- `crop`: added `fit` and `fit-group`
|
|
131
|
+
|
|
132
|
+
- artwork
|
|
133
|
+
|
|
134
|
+
- extended NOTICE.md: acknowledge `pikepdf`/`qpdf` and `pypdfium2`
|
|
135
|
+
|
|
136
|
+
- Windows testing
|
|
137
|
+
|
|
138
|
+
### Fixed
|
|
139
|
+
|
|
140
|
+
- performance improvements (lazy-loaded imports)
|
|
141
|
+
|
|
142
|
+
- help tweaks: add sources for non-operations; more help topic aliases
|
|
143
|
+
|
|
144
|
+
## [0.2.0] - 2025-12-13
|
|
145
|
+
|
|
146
|
+
### Added
|
|
147
|
+
|
|
148
|
+
- readthedocs integration and docs generation
|
|
149
|
+
|
|
150
|
+
### Fixed
|
|
151
|
+
|
|
152
|
+
- Improved help text
|
|
153
|
+
|
|
154
|
+
## [0.1.1] - 2025-12-12
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
|
|
158
|
+
- codecov integration
|
|
159
|
+
- PyPI publish integration
|
|
160
|
+
|
|
161
|
+
## [0.1.0] - 2025-12-11
|
|
162
|
+
|
|
163
|
+
### Added
|
|
164
|
+
|
|
165
|
+
- Initial public release of `pdftl`.
|
|
166
|
+
- Operations:
|
|
167
|
+
- ``add_text`` Add user-specified text strings to PDF pages
|
|
168
|
+
- ``background`` Use a 1-page PDF as the background for each page
|
|
169
|
+
- ``burst`` Split a single PDF into individual page files
|
|
170
|
+
- ``cat`` Concatenate pages from input PDFs into a new PDF
|
|
171
|
+
- ``chop`` Chop pages into multiple smaller pieces
|
|
172
|
+
- ``crop`` Crop pages
|
|
173
|
+
- ``delete`` Delete pages from an input PDF
|
|
174
|
+
- ``delete_annots`` Delete annotation info
|
|
175
|
+
- ``dump_annots`` Dump annotation info
|
|
176
|
+
- ``dump_data`` Metadata, page and bookmark info (XML-escaped)
|
|
177
|
+
- ``dump_data_annots`` Dump annotation info in pdftk style
|
|
178
|
+
- ``dump_data_fields`` Print PDF form field data with XML-style escaping
|
|
179
|
+
- ``dump_data_fields_utf8`` Print PDF form field data in UTF-8
|
|
180
|
+
- ``dump_data_utf8`` Metadata, page and bookmark info (in UTF-8)
|
|
181
|
+
- ``dump_dests`` Print PDF named destinations data to the console
|
|
182
|
+
- ``dump_text`` Print PDF text data to the console or a file
|
|
183
|
+
- ``fill_form`` Fill a PDF form
|
|
184
|
+
- ``filter`` Do nothing. (The default if ``<operation>`` omitted.)
|
|
185
|
+
- ``generate_fdf`` Generate an FDF file containing PDF form data
|
|
186
|
+
- ``inject`` Inject code at start or end of page content streams
|
|
187
|
+
- ``list_files`` List file attachments
|
|
188
|
+
- ``modify_annots`` Modify properties of existing annotations
|
|
189
|
+
- ``multibackground`` Use multiple pages as backgrounds
|
|
190
|
+
- ``multistamp`` Stamp multiple pages onto an input PDF
|
|
191
|
+
- ``normalize`` Reformat page content streams
|
|
192
|
+
- ``optimize_images`` Optimize images
|
|
193
|
+
- ``replace`` Regex replacement on page content streams
|
|
194
|
+
- ``rotate`` Rotate pages in a PDF
|
|
195
|
+
- ``shuffle`` Interleave pages from multiple input PDFs
|
|
196
|
+
- ``spin`` Spin page content in a PDF
|
|
197
|
+
- ``stamp`` Stamp a 1-page PDF onto each page of an input PDF
|
|
198
|
+
- ``unpack_files`` Unpack file attachments
|
|
199
|
+
- ``update_info`` Update PDF metadata
|
|
200
|
+
- ``update_info_utf8`` Update PDF metadata from dump_data_utf8 instructions
|
|
201
|
+
- Output options:
|
|
202
|
+
- ``allow <perm>...`` Specify permissions for encrypted files
|
|
203
|
+
- ``attach_files <file>``... Attach files to the output PDF
|
|
204
|
+
- ``compress`` (default) Compress output file streams
|
|
205
|
+
- ``drop_info`` Discard document-level info metadata
|
|
206
|
+
- ``drop_xmp`` Discard document-level XMP metadata
|
|
207
|
+
- ``encrypt_128bit`` Use 128 bit encryption (obsolete, maybe insecure)
|
|
208
|
+
- ``encrypt_40bit`` Use 40 bit encryption (obsolete, highly insecure)
|
|
209
|
+
- ``encrypt_aes128`` Use 128 bit AES encryption (maybe obsolete)
|
|
210
|
+
- ``encrypt_aes256`` Use 256 bit AES encryption
|
|
211
|
+
- ``flatten`` Flatten all annotations
|
|
212
|
+
- ``keep_final_id`` Copy final input PDF's ID metadata to output
|
|
213
|
+
- ``keep_first_id`` Copy first input PDF's ID metadata to output
|
|
214
|
+
- ``linearize`` Linearize output file(s)
|
|
215
|
+
- ``need_appearances`` Set a form rendering flag in the output PDF
|
|
216
|
+
- ``output <file>`` The output file path, or a template for 'burst'
|
|
217
|
+
- ``owner_pw <pw>`` Set owner password and encrypt output
|
|
218
|
+
- ``uncompress`` Disables compression of output file streams
|
|
219
|
+
- ``user_pw <pw>`` Set user password and encrypt output
|
|
220
|
+
- ``verbose`` Turn on verbose output
|
pdftl-0.7.0/LICENSE
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
Mozilla Public License Version 2.0
|
|
2
|
+
==================================
|
|
3
|
+
|
|
4
|
+
1. Definitions
|
|
5
|
+
--------------
|
|
6
|
+
|
|
7
|
+
1.1. "Contributor"
|
|
8
|
+
means each individual or legal entity that creates, contributes to
|
|
9
|
+
the creation of, or owns Covered Software.
|
|
10
|
+
|
|
11
|
+
1.2. "Contributor Version"
|
|
12
|
+
means the combination of the Contributions of others (if any) used
|
|
13
|
+
by a Contributor and that particular Contributor's Contribution.
|
|
14
|
+
|
|
15
|
+
1.3. "Contribution"
|
|
16
|
+
means Covered Software of a particular Contributor.
|
|
17
|
+
|
|
18
|
+
1.4. "Covered Software"
|
|
19
|
+
means Source Code Form to which the initial Contributor has attached
|
|
20
|
+
the notice in Exhibit A, the Executable Form of such Source Code
|
|
21
|
+
Form, and Modifications of such Source Code Form, in each case
|
|
22
|
+
including portions thereof.
|
|
23
|
+
|
|
24
|
+
1.5. "Incompatible With Secondary Licenses"
|
|
25
|
+
means
|
|
26
|
+
|
|
27
|
+
(a) that the initial Contributor has attached the notice described
|
|
28
|
+
in Exhibit B to the Covered Software; or
|
|
29
|
+
|
|
30
|
+
(b) that the Covered Software was made available under the terms of
|
|
31
|
+
version 1.1 or earlier of the License, but not also under the
|
|
32
|
+
terms of a Secondary License.
|
|
33
|
+
|
|
34
|
+
1.6. "Executable Form"
|
|
35
|
+
means any form of the work other than Source Code Form.
|
|
36
|
+
|
|
37
|
+
1.7. "Larger Work"
|
|
38
|
+
means a work that combines Covered Software with other material, in
|
|
39
|
+
a separate file or files, that is not Covered Software.
|
|
40
|
+
|
|
41
|
+
1.8. "License"
|
|
42
|
+
means this document.
|
|
43
|
+
|
|
44
|
+
1.9. "Licensable"
|
|
45
|
+
means having the right to grant, to the maximum extent possible,
|
|
46
|
+
whether at the time of the initial grant or subsequently, any and
|
|
47
|
+
all of the rights conveyed by this License.
|
|
48
|
+
|
|
49
|
+
1.10. "Modifications"
|
|
50
|
+
means any of the following:
|
|
51
|
+
|
|
52
|
+
(a) any file in Source Code Form that results from an addition to,
|
|
53
|
+
deletion from, or modification of the contents of Covered
|
|
54
|
+
Software; or
|
|
55
|
+
|
|
56
|
+
(b) any new file in Source Code Form that contains any Covered
|
|
57
|
+
Software.
|
|
58
|
+
|
|
59
|
+
1.11. "Patent Claims" of a Contributor
|
|
60
|
+
means any patent claim(s), including without limitation, method,
|
|
61
|
+
process, and apparatus claims, in any patent Licensable by such
|
|
62
|
+
Contributor that would be infringed, but for the grant of the
|
|
63
|
+
License, by the making, using, selling, offering for sale, having
|
|
64
|
+
made, import, or transfer of either its Contributions or its
|
|
65
|
+
Contributor Version.
|
|
66
|
+
|
|
67
|
+
1.12. "Secondary License"
|
|
68
|
+
means either the GNU General Public License, Version 2.0, the GNU
|
|
69
|
+
Lesser General Public License, Version 2.1, the GNU Affero General
|
|
70
|
+
Public License, Version 3.0, or any later versions of those
|
|
71
|
+
licenses.
|
|
72
|
+
|
|
73
|
+
1.13. "Source Code Form"
|
|
74
|
+
means the form of the work preferred for making modifications.
|
|
75
|
+
|
|
76
|
+
1.14. "You" (or "Your")
|
|
77
|
+
means an individual or a legal entity exercising rights under this
|
|
78
|
+
License. For legal entities, "You" includes any entity that
|
|
79
|
+
controls, is controlled by, or is under common control with You. For
|
|
80
|
+
purposes of this definition, "control" means (a) the power, direct
|
|
81
|
+
or indirect, to cause the direction or management of such entity,
|
|
82
|
+
whether by contract or otherwise, or (b) ownership of more than
|
|
83
|
+
fifty percent (50%) of the outstanding shares or beneficial
|
|
84
|
+
ownership of such entity.
|
|
85
|
+
|
|
86
|
+
2. License Grants and Conditions
|
|
87
|
+
--------------------------------
|
|
88
|
+
|
|
89
|
+
2.1. Grants
|
|
90
|
+
|
|
91
|
+
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
92
|
+
non-exclusive license:
|
|
93
|
+
|
|
94
|
+
(a) under intellectual property rights (other than patent or trademark)
|
|
95
|
+
Licensable by such Contributor to use, reproduce, make available,
|
|
96
|
+
modify, display, perform, distribute, and otherwise exploit its
|
|
97
|
+
Contributions, either on an unmodified basis, with Modifications, or
|
|
98
|
+
as part of a Larger Work; and
|
|
99
|
+
|
|
100
|
+
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
|
101
|
+
for sale, have made, import, and otherwise transfer either its
|
|
102
|
+
Contributions or its Contributor Version.
|
|
103
|
+
|
|
104
|
+
2.2. Effective Date
|
|
105
|
+
|
|
106
|
+
The licenses granted in Section 2.1 with respect to any Contribution
|
|
107
|
+
become effective for each Contribution on the date the Contributor first
|
|
108
|
+
distributes such Contribution.
|
|
109
|
+
|
|
110
|
+
2.3. Limitations on Grant Scope
|
|
111
|
+
|
|
112
|
+
The licenses granted in this Section 2 are the only rights granted under
|
|
113
|
+
this License. No additional rights or licenses will be implied from the
|
|
114
|
+
distribution or licensing of Covered Software under this License.
|
|
115
|
+
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
116
|
+
Contributor:
|
|
117
|
+
|
|
118
|
+
(a) for any code that a Contributor has removed from Covered Software;
|
|
119
|
+
or
|
|
120
|
+
|
|
121
|
+
(b) for infringements caused by: (i) Your and any other third party's
|
|
122
|
+
modifications of Covered Software, or (ii) the combination of its
|
|
123
|
+
Contributions with other software (except as part of its Contributor
|
|
124
|
+
Version); or
|
|
125
|
+
|
|
126
|
+
(c) under Patent Claims infringed by Covered Software in the absence of
|
|
127
|
+
its Contributions.
|
|
128
|
+
|
|
129
|
+
This License does not grant any rights in the trademarks, service marks,
|
|
130
|
+
or logos of any Contributor (except as may be necessary to comply with
|
|
131
|
+
the notice requirements in Section 3.4).
|
|
132
|
+
|
|
133
|
+
2.4. Subsequent Licenses
|
|
134
|
+
|
|
135
|
+
No Contributor makes additional grants as a result of Your choice to
|
|
136
|
+
distribute the Covered Software under a subsequent version of this
|
|
137
|
+
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
138
|
+
permitted under the terms of Section 3.3).
|
|
139
|
+
|
|
140
|
+
2.5. Representation
|
|
141
|
+
|
|
142
|
+
Each Contributor represents that the Contributor believes its
|
|
143
|
+
Contributions are its original creation(s) or it has sufficient rights
|
|
144
|
+
to grant the rights to its Contributions conveyed by this License.
|
|
145
|
+
|
|
146
|
+
2.6. Fair Use
|
|
147
|
+
|
|
148
|
+
This License is not intended to limit any rights You have under
|
|
149
|
+
applicable copyright doctrines of fair use, fair dealing, or other
|
|
150
|
+
equivalents.
|
|
151
|
+
|
|
152
|
+
2.7. Conditions
|
|
153
|
+
|
|
154
|
+
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
|
155
|
+
in Section 2.1.
|
|
156
|
+
|
|
157
|
+
3. Responsibilities
|
|
158
|
+
-------------------
|
|
159
|
+
|
|
160
|
+
3.1. Distribution of Source Form
|
|
161
|
+
|
|
162
|
+
All distribution of Covered Software in Source Code Form, including any
|
|
163
|
+
Modifications that You create or to which You contribute, must be under
|
|
164
|
+
the terms of this License. You must inform recipients that the Source
|
|
165
|
+
Code Form of the Covered Software is governed by the terms of this
|
|
166
|
+
License, and how they can obtain a copy of this License. You may not
|
|
167
|
+
attempt to alter or restrict the recipients' rights in the Source Code
|
|
168
|
+
Form.
|
|
169
|
+
|
|
170
|
+
3.2. Distribution of Executable Form
|
|
171
|
+
|
|
172
|
+
If You distribute Covered Software in Executable Form then:
|
|
173
|
+
|
|
174
|
+
(a) such Covered Software must also be made available in Source Code
|
|
175
|
+
Form, as described in Section 3.1, and You must inform recipients of
|
|
176
|
+
the Executable Form how they can obtain a copy of such Source Code
|
|
177
|
+
Form by reasonable means in a timely manner, at a charge no more
|
|
178
|
+
than the cost of distribution to the recipient; and
|
|
179
|
+
|
|
180
|
+
(b) You may distribute such Executable Form under the terms of this
|
|
181
|
+
License, or sublicense it under different terms, provided that the
|
|
182
|
+
license for the Executable Form does not attempt to limit or alter
|
|
183
|
+
the recipients' rights in the Source Code Form under this License.
|
|
184
|
+
|
|
185
|
+
3.3. Distribution of a Larger Work
|
|
186
|
+
|
|
187
|
+
You may create and distribute a Larger Work under terms of Your choice,
|
|
188
|
+
provided that You also comply with the requirements of this License for
|
|
189
|
+
the Covered Software. If the Larger Work is a combination of Covered
|
|
190
|
+
Software with a work governed by one or more Secondary Licenses, and the
|
|
191
|
+
Covered Software is not Incompatible With Secondary Licenses, this
|
|
192
|
+
License permits You to additionally distribute such Covered Software
|
|
193
|
+
under the terms of such Secondary License(s), so that the recipient of
|
|
194
|
+
the Larger Work may, at their option, further distribute the Covered
|
|
195
|
+
Software under the terms of either this License or such Secondary
|
|
196
|
+
License(s).
|
|
197
|
+
|
|
198
|
+
3.4. Notices
|
|
199
|
+
|
|
200
|
+
You may not remove or alter the substance of any license notices
|
|
201
|
+
(including copyright notices, patent notices, disclaimers of warranty,
|
|
202
|
+
or limitations of liability) contained within the Source Code Form of
|
|
203
|
+
the Covered Software, except that You may alter any license notices to
|
|
204
|
+
the extent required to remedy known factual inaccuracies.
|
|
205
|
+
|
|
206
|
+
3.5. Application of Additional Terms
|
|
207
|
+
|
|
208
|
+
You may choose to offer, and to charge a fee for, warranty, support,
|
|
209
|
+
indemnity or liability obligations to one or more recipients of Covered
|
|
210
|
+
Software. However, You may do so only on Your own behalf, and not on
|
|
211
|
+
behalf of any Contributor. You must make it absolutely clear that any
|
|
212
|
+
such warranty, support, indemnity, or liability obligation is offered by
|
|
213
|
+
You alone, and You hereby agree to indemnify every Contributor for any
|
|
214
|
+
liability incurred by such Contributor as a result of warranty, support,
|
|
215
|
+
indemnity or liability terms You offer. You may include additional
|
|
216
|
+
disclaimers of warranty and limitations of liability specific to any
|
|
217
|
+
jurisdiction.
|
|
218
|
+
|
|
219
|
+
4. Inability to Comply Due to Statute or Regulation
|
|
220
|
+
---------------------------------------------------
|
|
221
|
+
|
|
222
|
+
If it is impossible for You to comply with any of the terms of this
|
|
223
|
+
License with respect to some or all of the Covered Software due to
|
|
224
|
+
statute, judicial order, or regulation then You must: (a) comply with
|
|
225
|
+
the terms of this License to the maximum extent possible; and (b)
|
|
226
|
+
describe the limitations and the code they affect. Such description must
|
|
227
|
+
be placed in a text file included with all distributions of the Covered
|
|
228
|
+
Software under this License. Except to the extent prohibited by statute
|
|
229
|
+
or regulation, such description must be sufficiently detailed for a
|
|
230
|
+
recipient of ordinary skill to be able to understand it.
|
|
231
|
+
|
|
232
|
+
5. Termination
|
|
233
|
+
--------------
|
|
234
|
+
|
|
235
|
+
5.1. The rights granted under this License will terminate automatically
|
|
236
|
+
if You fail to comply with any of its terms. However, if You become
|
|
237
|
+
compliant, then the rights granted under this License from a particular
|
|
238
|
+
Contributor are reinstated (a) provisionally, unless and until such
|
|
239
|
+
Contributor explicitly and finally terminates Your grants, and (b) on an
|
|
240
|
+
ongoing basis, if such Contributor fails to notify You of the
|
|
241
|
+
non-compliance by some reasonable means prior to 60 days after You have
|
|
242
|
+
come back into compliance. Moreover, Your grants from a particular
|
|
243
|
+
Contributor are reinstated on an ongoing basis if such Contributor
|
|
244
|
+
notifies You of the non-compliance by some reasonable means, this is the
|
|
245
|
+
first time You have received notice of non-compliance with this License
|
|
246
|
+
from such Contributor, and You become compliant prior to 30 days after
|
|
247
|
+
Your receipt of the notice.
|
|
248
|
+
|
|
249
|
+
5.2. If You initiate litigation against any entity by asserting a patent
|
|
250
|
+
infringement claim (excluding declaratory judgment actions,
|
|
251
|
+
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
252
|
+
directly or indirectly infringes any patent, then the rights granted to
|
|
253
|
+
You by any and all Contributors for the Covered Software under Section
|
|
254
|
+
2.1 of this License shall terminate.
|
|
255
|
+
|
|
256
|
+
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
|
257
|
+
end user license agreements (excluding distributors and resellers) which
|
|
258
|
+
have been validly granted by You or Your distributors under this License
|
|
259
|
+
prior to termination shall survive termination.
|
|
260
|
+
|
|
261
|
+
************************************************************************
|
|
262
|
+
* *
|
|
263
|
+
* 6. Disclaimer of Warranty *
|
|
264
|
+
* ------------------------- *
|
|
265
|
+
* *
|
|
266
|
+
* Covered Software is provided under this License on an "as is" *
|
|
267
|
+
* basis, without warranty of any kind, either expressed, implied, or *
|
|
268
|
+
* statutory, including, without limitation, warranties that the *
|
|
269
|
+
* Covered Software is free of defects, merchantable, fit for a *
|
|
270
|
+
* particular purpose or non-infringing. The entire risk as to the *
|
|
271
|
+
* quality and performance of the Covered Software is with You. *
|
|
272
|
+
* Should any Covered Software prove defective in any respect, You *
|
|
273
|
+
* (not any Contributor) assume the cost of any necessary servicing, *
|
|
274
|
+
* repair, or correction. This disclaimer of warranty constitutes an *
|
|
275
|
+
* essential part of this License. No use of any Covered Software is *
|
|
276
|
+
* authorized under this License except under this disclaimer. *
|
|
277
|
+
* *
|
|
278
|
+
************************************************************************
|
|
279
|
+
|
|
280
|
+
************************************************************************
|
|
281
|
+
* *
|
|
282
|
+
* 7. Limitation of Liability *
|
|
283
|
+
* -------------------------- *
|
|
284
|
+
* *
|
|
285
|
+
* Under no circumstances and under no legal theory, whether tort *
|
|
286
|
+
* (including negligence), contract, or otherwise, shall any *
|
|
287
|
+
* Contributor, or anyone who distributes Covered Software as *
|
|
288
|
+
* permitted above, be liable to You for any direct, indirect, *
|
|
289
|
+
* special, incidental, or consequential damages of any character *
|
|
290
|
+
* including, without limitation, damages for lost profits, loss of *
|
|
291
|
+
* goodwill, work stoppage, computer failure or malfunction, or any *
|
|
292
|
+
* and all other commercial damages or losses, even if such party *
|
|
293
|
+
* shall have been informed of the possibility of such damages. This *
|
|
294
|
+
* limitation of liability shall not apply to liability for death or *
|
|
295
|
+
* personal injury resulting from such party's negligence to the *
|
|
296
|
+
* extent applicable law prohibits such limitation. Some *
|
|
297
|
+
* jurisdictions do not allow the exclusion or limitation of *
|
|
298
|
+
* incidental or consequential damages, so this exclusion and *
|
|
299
|
+
* limitation may not apply to You. *
|
|
300
|
+
* *
|
|
301
|
+
************************************************************************
|
|
302
|
+
|
|
303
|
+
8. Litigation
|
|
304
|
+
-------------
|
|
305
|
+
|
|
306
|
+
Any litigation relating to this License may be brought only in the
|
|
307
|
+
courts of a jurisdiction where the defendant maintains its principal
|
|
308
|
+
place of business and such litigation shall be governed by laws of that
|
|
309
|
+
jurisdiction, without reference to its conflict-of-law provisions.
|
|
310
|
+
Nothing in this Section shall prevent a party's ability to bring
|
|
311
|
+
cross-claims or counter-claims.
|
|
312
|
+
|
|
313
|
+
9. Miscellaneous
|
|
314
|
+
----------------
|
|
315
|
+
|
|
316
|
+
This License represents the complete agreement concerning the subject
|
|
317
|
+
matter hereof. If any provision of this License is held to be
|
|
318
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
319
|
+
necessary to make it enforceable. Any law or regulation which provides
|
|
320
|
+
that the language of a contract shall be construed against the drafter
|
|
321
|
+
shall not be used to construe this License against a Contributor.
|
|
322
|
+
|
|
323
|
+
10. Versions of the License
|
|
324
|
+
---------------------------
|
|
325
|
+
|
|
326
|
+
10.1. New Versions
|
|
327
|
+
|
|
328
|
+
Mozilla Foundation is the license steward. Except as provided in Section
|
|
329
|
+
10.3, no one other than the license steward has the right to modify or
|
|
330
|
+
publish new versions of this License. Each version will be given a
|
|
331
|
+
distinguishing version number.
|
|
332
|
+
|
|
333
|
+
10.2. Effect of New Versions
|
|
334
|
+
|
|
335
|
+
You may distribute the Covered Software under the terms of the version
|
|
336
|
+
of the License under which You originally received the Covered Software,
|
|
337
|
+
or under the terms of any subsequent version published by the license
|
|
338
|
+
steward.
|
|
339
|
+
|
|
340
|
+
10.3. Modified Versions
|
|
341
|
+
|
|
342
|
+
If you create software not governed by this License, and you want to
|
|
343
|
+
create a new license for such software, you may create and use a
|
|
344
|
+
modified version of this License if you rename the license and remove
|
|
345
|
+
any references to the name of the license steward (except to note that
|
|
346
|
+
such modified license differs from this License).
|
|
347
|
+
|
|
348
|
+
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
349
|
+
Licenses
|
|
350
|
+
|
|
351
|
+
If You choose to distribute Source Code Form that is Incompatible With
|
|
352
|
+
Secondary Licenses under the terms of this version of the License, the
|
|
353
|
+
notice described in Exhibit B of this License must be attached.
|
|
354
|
+
|
|
355
|
+
Exhibit A - Source Code Form License Notice
|
|
356
|
+
-------------------------------------------
|
|
357
|
+
|
|
358
|
+
This Source Code Form is subject to the terms of the Mozilla Public
|
|
359
|
+
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
360
|
+
file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
361
|
+
|
|
362
|
+
If it is not possible or desirable to put the notice in a particular
|
|
363
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
364
|
+
file in a relevant directory) where a recipient would be likely to look
|
|
365
|
+
for such a notice.
|
|
366
|
+
|
|
367
|
+
You may add additional accurate notices of copyright ownership.
|
|
368
|
+
|
|
369
|
+
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
370
|
+
---------------------------------------------------------
|
|
371
|
+
|
|
372
|
+
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
373
|
+
defined by the Mozilla Public License, v. 2.0.
|
pdftl-0.7.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# --- Core Metadata ---
|
|
2
|
+
include pyproject.toml
|
|
3
|
+
include README.md
|
|
4
|
+
include LICENSE
|
|
5
|
+
include NOTICE.md
|
|
6
|
+
include *.md
|
|
7
|
+
include *.yaml
|
|
8
|
+
|
|
9
|
+
# --- Package Data ---
|
|
10
|
+
recursive-include src/pdftl *.py
|
|
11
|
+
recursive-include src/pdftl *.pyi
|
|
12
|
+
include src/pdftl/py.typed
|
|
13
|
+
|
|
14
|
+
# --- Tests & Assets ---
|
|
15
|
+
# useful for downstream packagers like Debian
|
|
16
|
+
recursive-include tests *.py
|
|
17
|
+
recursive-include tests/assets *.pdf *.fdf *.txt
|
|
18
|
+
recursive-include tests *.cnf *.csr *.pem
|
|
19
|
+
|
|
20
|
+
# --- Documentation ---
|
|
21
|
+
include docs/Makefile
|
|
22
|
+
include docs/README*.md
|
|
23
|
+
include docs/*.py
|
|
24
|
+
|
|
25
|
+
# --- Tools/Scripts ---
|
|
26
|
+
recursive-include tools *.py
|
|
27
|
+
|
|
28
|
+
# --- Excludes (Global) ---
|
|
29
|
+
|
|
30
|
+
# Remove CI/CD configuration and local artifacts
|
|
31
|
+
|
|
32
|
+
prune .github
|
|
33
|
+
exclude .gitignore
|
|
34
|
+
exclude pytest.log
|
|
35
|
+
|
|
36
|
+
# Remove Python compilation artifacts
|
|
37
|
+
|
|
38
|
+
global-exclude __pycache__
|
|
39
|
+
global-exclude *.py[cod]
|
|
40
|
+
global-exclude *.so
|
|
41
|
+
global-exclude *.dylib
|
|
42
|
+
|
|
43
|
+
# Remove OS/Editor junk
|
|
44
|
+
|
|
45
|
+
global-exclude .DS_Store
|
|
46
|
+
global-exclude .git*
|
|
47
|
+
global-exclude *conflicted*
|
pdftl-0.7.0/NOTICE.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# pdftl Notices
|
|
2
|
+
|
|
3
|
+
This software is distributed under the Mozilla Public License 2.0.
|
|
4
|
+
|
|
5
|
+
## Artwork
|
|
6
|
+
|
|
7
|
+
### The `pdftl` icon
|
|
8
|
+
|
|
9
|
+
The [`pdftl` icon](https://raw.githubusercontent.com/pdftl/pdftl/main/.github/assets/pdftl.svg) is a derivative work. It incorporates elements from the [Google Noto Emoji](https://github.com/googlefonts/noto-emoji) library.
|
|
10
|
+
* **Original copyright:** 2013 Google Inc.
|
|
11
|
+
* **Original license:** Apache License, Version 2.0
|
|
12
|
+
* **Modifications:** The artwork has been modified (recolored, reshaped, and combined) for the `pdftl` project.
|
|
13
|
+
* **Icon license:** These modifications and the resulting composite icon are licensed under the **Mozilla Public License 2.0** to match the `pdftl` project's primary license.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Third-party components
|
|
17
|
+
|
|
18
|
+
### OCRmyPDF
|
|
19
|
+
|
|
20
|
+
Portions of the `optimize_images` command are adapted from [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF).
|
|
21
|
+
|
|
22
|
+
* **Original author:** James R. Barlow
|
|
23
|
+
* **License:** Mozilla Public License 2.0
|
|
24
|
+
* **Copyright:** © 2022 James R. Barlow
|
|
25
|
+
|
|
26
|
+
The original source code can be found at <https://github.com/ocrmypdf/OCRmyPDF>.
|
|
27
|
+
|
|
28
|
+
### pikepdf/qpdf
|
|
29
|
+
|
|
30
|
+
This project relies heavily on pikepdf (© 2022-2024 James R. Barlow, MPL 2.0) and qpdf (MPL 2.0). While not directly "adapted" code, they are core dependencies that make this tool possible.
|
|
31
|
+
|
|
32
|
+
### pypdfium2 / PDFium
|
|
33
|
+
The `dump_text` operation is powered by **pypdfium2**.
|
|
34
|
+
* **License:** BSD-3-Clause
|
|
35
|
+
* **Source:** https://github.com/pypdfium2/pypdfium2
|