[package]
edition = "2021"
rust-version = "1.77"
name = "oxidize-pdf"
version = "1.6.13"
authors = ["Santiago Fernández Muñoz"]
build = false
exclude = [
"tests/fixtures/*.pdf",
"tests/fixtures/*.sh",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A pure Rust PDF generation and manipulation library with zero external dependencies"
homepage = "https://github.com/bzsanti/oxidizePdf"
documentation = "https://docs.rs/oxidize-pdf"
readme = "README.md"
keywords = [
"pdf",
"document",
"generation",
"parser",
"graphics",
]
categories = [
"graphics",
"text-processing",
"parsing",
"multimedia::images",
]
license = "AGPL-3.0"
repository = "https://github.com/bzsanti/oxidizePdf"
[features]
compression = ["dep:flate2"]
default = [
"compression",
"ocr-tesseract",
]
enterprise = []
external-images = ["dep:image"]
ocr-full = ["ocr-tesseract"]
ocr-tesseract = [
"dep:rusty-tesseract",
"external-images",
]
performance = [
"dep:rayon",
"compression",
]
pro = []
rayon = ["dep:rayon"]
real-pdf-tests = []
semantic = ["dep:serde_json"]
verbose-debug = []
[lib]
name = "oxidize_pdf"
path = "src/lib.rs"
[[example]]
name = "advanced_table_extraction"
path = "examples/advanced_table_extraction.rs"
[[example]]
name = "advanced_tables_adjusted_example"
path = "examples/advanced_tables_adjusted_example.rs"
[[example]]
name = "advanced_tables_example"
path = "examples/advanced_tables_example.rs"
[[example]]
name = "advanced_tables_landscape_example"
path = "examples/advanced_tables_landscape_example.rs"
[[example]]
name = "advanced_tables_truncated_example"
path = "examples/advanced_tables_truncated_example.rs"
[[example]]
name = "ai_ready_contract"
path = "examples/ai_ready_contract.rs"
[[example]]
name = "ai_ready_invoice"
path = "examples/ai_ready_invoice.rs"
[[example]]
name = "ai_ready_resume"
path = "examples/ai_ready_resume.rs"
[[example]]
name = "analyze_decoded_stream"
path = "examples/analyze_decoded_stream.rs"
[[example]]
name = "analyze_failing_stream"
path = "examples/analyze_failing_stream.rs"
[[example]]
name = "analyze_table"
path = "examples/analyze_table.rs"
[[example]]
name = "batch_processing"
path = "examples/batch_processing.rs"
required-features = ["rayon"]
[[example]]
name = "batch_processing_advanced"
path = "examples/batch_processing_advanced.rs"
[[example]]
name = "button_fields_demo"
path = "examples/button_fields_demo.rs"
[[example]]
name = "calibrated_colors_demo"
path = "examples/calibrated_colors_demo.rs"
[[example]]
name = "charts_comprehensive_test"
path = "examples/charts_comprehensive_test.rs"
[[example]]
name = "charts_coordinate_problem"
path = "examples/charts_coordinate_problem.rs"
[[example]]
name = "charts_dashboard_integration_test"
path = "examples/charts_dashboard_integration_test.rs"
[[example]]
name = "charts_example"
path = "examples/charts_example.rs"
[[example]]
name = "charts_fixed_example"
path = "examples/charts_fixed_example.rs"
[[example]]
name = "charts_text_alignment_test"
path = "examples/charts_text_alignment_test.rs"
[[example]]
name = "cjk_text_extraction"
path = "examples/cjk_text_extraction.rs"
[[example]]
name = "compare_iso_matrices"
path = "examples/compare_iso_matrices.rs"
[[example]]
name = "convert_pdf_ocr"
path = "examples/convert_pdf_ocr.rs"
[[example]]
name = "dashboard_sales_report"
path = "examples/dashboard_sales_report.rs"
[[example]]
name = "dashboard_templates_demo"
path = "examples/dashboard_templates_demo.rs"
[[example]]
name = "debug_flate_predictor"
path = "examples/debug_flate_predictor.rs"
[[example]]
name = "debug_font_encoding"
path = "examples/debug_font_encoding.rs"
[[example]]
name = "debug_predictor_structure"
path = "examples/debug_predictor_structure.rs"
[[example]]
name = "debug_transparency"
path = "examples/debug_transparency.rs"
[[example]]
name = "debug_xref_streams"
path = "examples/debug_xref_streams.rs"
[[example]]
name = "demo_issues_fixed"
path = "examples/demo_issues_fixed.rs"
[[example]]
name = "diagnose_failures"
path = "examples/diagnose_failures.rs"
[[example]]
name = "diagnose_xref_confusion"
path = "examples/diagnose_xref_confusion.rs"
[[example]]
name = "expand_iso_matrix"
path = "examples/expand_iso_matrix.rs"
[[example]]
name = "extract_images_demo"
path = "examples/extract_images_demo.rs"
[[example]]
name = "extract_multiple_pages"
path = "examples/extract_multiple_pages.rs"
[[example]]
name = "extract_page_14"
path = "examples/extract_page_14.rs"
[[example]]
name = "extreme_complexity_benchmark"
path = "examples/extreme_complexity_benchmark.rs"
[[example]]
name = "field_actions"
path = "examples/field_actions.rs"
[[example]]
name = "font_spacing_test"
path = "examples/font_spacing_test.rs"
[[example]]
name = "font_subsetting_test"
path = "examples/font_subsetting_test.rs"
[[example]]
name = "form_validation"
path = "examples/form_validation.rs"
[[example]]
name = "generate_compliance_report"
path = "examples/generate_compliance_report.rs"
[[example]]
name = "generate_jpeg_test_fixture"
path = "examples/generate_jpeg_test_fixture.rs"
[[example]]
name = "heatmap_simple_test"
path = "examples/heatmap_simple_test.rs"
[[example]]
name = "hello_world"
path = "examples/hello_world.rs"
[[example]]
name = "high_complexity_benchmark"
path = "examples/high_complexity_benchmark.rs"
[[example]]
name = "high_performance_demo"
path = "examples/high_performance_demo.rs"
[[example]]
name = "icc_indexed_colors"
path = "examples/icc_indexed_colors.rs"
[[example]]
name = "incremental_form_update"
path = "examples/incremental_form_update.rs"
[[example]]
name = "incremental_overlay_simple"
path = "examples/incremental_overlay_simple.rs"
[[example]]
name = "incremental_overlay_working"
path = "examples/incremental_overlay_working.rs"
[[example]]
name = "incremental_page_replacement_manual"
path = "examples/incremental_page_replacement_manual.rs"
[[example]]
name = "invoice_complete"
path = "examples/invoice_complete.rs"
[[example]]
name = "invoice_extraction_advanced"
path = "examples/invoice_extraction_advanced.rs"
[[example]]
name = "keyvalue_extraction"
path = "examples/keyvalue_extraction.rs"
[[example]]
name = "line_chart_dashboard_test"
path = "examples/line_chart_dashboard_test.rs"
[[example]]
name = "llm_export_formats"
path = "examples/llm_export_formats.rs"
[[example]]
name = "medium_complexity_benchmark"
path = "examples/medium_complexity_benchmark.rs"
[[example]]
name = "modern_pdf_compression"
path = "examples/modern_pdf_compression.rs"
[[example]]
name = "object_streams_demo"
path = "examples/object_streams_demo.rs"
[[example]]
name = "page_overlay_mvp"
path = "examples/page_overlay_mvp.rs"
[[example]]
name = "page_overlay_with_content"
path = "examples/page_overlay_with_content.rs"
[[example]]
name = "parse_iso_spec"
path = "examples/parse_iso_spec.rs"
[[example]]
name = "pdf_compression_with_images"
path = "examples/pdf_compression_with_images.rs"
[[example]]
name = "pdf_to_llm_formats"
path = "examples/pdf_to_llm_formats.rs"
[[example]]
name = "phase1_font_metadata_test"
path = "examples/phase1_font_metadata_test.rs"
[[example]]
name = "phase2_vector_extraction_test"
path = "examples/phase2_vector_extraction_test.rs"
[[example]]
name = "phase3_table_detection_test"
path = "examples/phase3_table_detection_test.rs"
[[example]]
name = "pivot_table_simple_test"
path = "examples/pivot_table_simple_test.rs"
[[example]]
name = "plaintext_extraction"
path = "examples/plaintext_extraction.rs"
[[example]]
name = "png_transparency_watermark"
path = "examples/png_transparency_watermark.rs"
[[example]]
name = "random_pdf_test"
path = "examples/random_pdf_test.rs"
[[example]]
name = "realistic_document_benchmark"
path = "examples/realistic_document_benchmark.rs"
[[example]]
name = "recovery_corrupted_pdf"
path = "examples/recovery_corrupted_pdf.rs"
[[example]]
name = "scatter_plot_simple_test"
path = "examples/scatter_plot_simple_test.rs"
[[example]]
name = "simple_document_benchmark"
path = "examples/simple_document_benchmark.rs"
[[example]]
name = "table_extraction"
path = "examples/table_extraction.rs"
[[example]]
name = "tagged_pdf_basic"
path = "examples/tagged_pdf_basic.rs"
[[example]]
name = "tagged_pdf_demo"
path = "examples/tagged_pdf_demo.rs"
[[example]]
name = "template_invoice_demo"
path = "examples/template_invoice_demo.rs"
[[example]]
name = "tesseract_debug"
path = "examples/tesseract_debug.rs"
[[example]]
name = "test_all_fixtures_extraction"
path = "examples/test_all_fixtures_extraction.rs"
[[example]]
name = "test_cjk_comprehensive"
path = "examples/test_cjk_comprehensive.rs"
[[example]]
name = "test_cjk_fonts"
path = "examples/test_cjk_fonts.rs"
[[example]]
name = "test_cjk_fonts_issue46"
path = "examples/test_cjk_fonts_issue46.rs"
[[example]]
name = "test_cjk_preview_compatibility"
path = "examples/test_cjk_preview_compatibility.rs"
[[example]]
name = "test_corrupt_pdf_issue47"
path = "examples/test_corrupt_pdf_issue47.rs"
[[example]]
name = "test_error_fixes"
path = "examples/test_error_fixes.rs"
[[example]]
name = "test_extract_text_issue47"
path = "examples/test_extract_text_issue47.rs"
[[example]]
name = "test_issue47_verification"
path = "examples/test_issue47_verification.rs"
[[example]]
name = "test_multi_page_extraction"
path = "examples/test_multi_page_extraction.rs"
[[example]]
name = "test_ocr_simple"
path = "examples/test_ocr_simple.rs"
[[example]]
name = "test_ocr_with_tesseract"
path = "examples/test_ocr_with_tesseract.rs"
required-features = ["ocr-tesseract"]
[[example]]
name = "test_parent_resources"
path = "examples/test_parent_resources.rs"
[[example]]
name = "test_random_fixtures"
path = "examples/test_random_fixtures.rs"
[[example]]
name = "test_random_fixtures_extraction"
path = "examples/test_random_fixtures_extraction.rs"
[[example]]
name = "test_random_fixtures_simple"
path = "examples/test_random_fixtures_simple.rs"
[[example]]
name = "test_row_alignment_fix"
path = "examples/test_row_alignment_fix.rs"
[[example]]
name = "test_text_extraction_demo"
path = "examples/test_text_extraction_demo.rs"
[[example]]
name = "transfer_functions"
path = "examples/transfer_functions.rs"
[[example]]
name = "transparency"
path = "examples/transparency.rs"
[[example]]
name = "treemap_simple_test"
path = "examples/treemap_simple_test.rs"
[[example]]
name = "truetype_subsetting"
path = "examples/truetype_subsetting.rs"
[[example]]
name = "xmp_metadata_demo"
path = "examples/xmp_metadata_demo.rs"
[[test]]
name = "advanced_tables_tests"
path = "tests/advanced_tables_tests.rs"
[[test]]
name = "annotations_comprehensive_test"
path = "tests/annotations_comprehensive_test.rs"
[[test]]
name = "annotations_error_handling_test"
path = "tests/annotations_error_handling_test.rs"
[[test]]
name = "annotations_integration_test"
path = "tests/annotations_integration_test.rs"
[[test]]
name = "annotations_tests"
path = "tests/annotations_tests.rs"
[[test]]
name = "architecture_simple_test"
path = "tests/architecture_simple_test.rs"
[[test]]
name = "batch_processing_tests"
path = "tests/batch_processing_tests.rs"
[[test]]
name = "calibrated_color_tests"
path = "tests/calibrated_color_tests.rs"
[[test]]
name = "charts_tests"
path = "tests/charts_tests.rs"
[[test]]
name = "choice_fields_tests"
path = "tests/choice_fields_tests.rs"
[[test]]
name = "circular_ref_test"
path = "tests/circular_ref_test.rs"
[[test]]
name = "cjk_font_integration_test"
path = "tests/cjk_font_integration_test.rs"
[[test]]
name = "cli_ocr_tests"
path = "tests/cli_ocr_tests.rs"
[[test]]
name = "compression_test"
path = "tests/compression_test.rs"
[[test]]
name = "custom_fonts_test"
path = "tests/custom_fonts_test.rs"
[[test]]
name = "dashboard_integration_test"
path = "tests/dashboard_integration_test.rs"
[[test]]
name = "devicen_color_tests"
path = "tests/devicen_color_tests.rs"
[[test]]
name = "draw_image_transparency_tests"
path = "tests/draw_image_transparency_tests.rs"
[[test]]
name = "encryption_algorithm_2b_test"
path = "tests/encryption_algorithm_2b_test.rs"
[[test]]
name = "encryption_basic_test"
path = "tests/encryption_basic_test.rs"
[[test]]
name = "encryption_cross_validation_test"
path = "tests/encryption_cross_validation_test.rs"
[[test]]
name = "encryption_dependencies_test"
path = "tests/encryption_dependencies_test.rs"
[[test]]
name = "encryption_owner_password_test"
path = "tests/encryption_owner_password_test.rs"
[[test]]
name = "encryption_password_test"
path = "tests/encryption_password_test.rs"
[[test]]
name = "encryption_r5_real_pdf_test"
path = "tests/encryption_r5_real_pdf_test.rs"
[[test]]
name = "encryption_r6_real_pdf_test"
path = "tests/encryption_r6_real_pdf_test.rs"
[[test]]
name = "encryption_real_pdf_test"
path = "tests/encryption_real_pdf_test.rs"
[[test]]
name = "end_to_end_test"
path = "tests/end_to_end_test.rs"
[[test]]
name = "field_appearance_tests"
path = "tests/field_appearance_tests.rs"
[[test]]
name = "fixtures_support"
path = "tests/fixtures_support.rs"
[[test]]
name = "font_embedding_integration"
path = "tests/font_embedding_integration.rs"
[[test]]
name = "font_embedding_integration_test"
path = "tests/font_embedding_integration_test.rs"
[[test]]
name = "font_encoding_test"
path = "tests/font_encoding_test.rs"
[[test]]
name = "font_workflows_integration"
path = "tests/font_workflows_integration.rs"
[[test]]
name = "fonts_comprehensive_test"
path = "tests/fonts_comprehensive_test.rs"
[[test]]
name = "fonts_unit_tests"
path = "tests/fonts_unit_tests.rs"
[[test]]
name = "form_actions_tests"
path = "tests/form_actions_tests.rs"
[[test]]
name = "form_processing_integration"
path = "tests/form_processing_integration.rs"
[[test]]
name = "forms_comprehensive_test"
path = "tests/forms_comprehensive_test.rs"
[[test]]
name = "forms_cross_module_integration_test"
path = "tests/forms_cross_module_integration_test.rs"
[[test]]
name = "forms_document_integration_test"
path = "tests/forms_document_integration_test.rs"
[[test]]
name = "forms_error_handling_test"
path = "tests/forms_error_handling_test.rs"
[[test]]
name = "forms_parser_integration_test"
path = "tests/forms_parser_integration_test.rs"
[[test]]
name = "forms_performance_scalability_test"
path = "tests/forms_performance_scalability_test.rs"
[[test]]
name = "forms_validation_javascript_test"
path = "tests/forms_validation_javascript_test.rs"
[[test]]
name = "incremental_overlay_tests"
path = "tests/incremental_overlay_tests.rs"
[[test]]
name = "integration_compression"
path = "tests/integration_compression.rs"
[[test]]
name = "integration_encryption"
path = "tests/integration_encryption.rs"
[[test]]
name = "integration_fonts"
path = "tests/integration_fonts.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "interactive_features_test"
path = "tests/interactive_features_test.rs"
[[test]]
name = "invoice_extraction_tests"
path = "tests/invoice_extraction_tests.rs"
[[test]]
name = "invoice_pattern_api_tests"
path = "tests/invoice_pattern_api_tests.rs"
[[test]]
name = "iso_curation_stats_tests"
path = "tests/iso_curation_stats_tests.rs"
[[test]]
name = "iso_curation_validation_tests"
path = "tests/iso_curation_validation_tests.rs"
[[test]]
name = "iso_document_catalog_tests"
path = "tests/iso_document_catalog_tests.rs"
[[test]]
name = "iso_system_demo"
path = "tests/iso_system_demo.rs"
[[test]]
name = "iso_verification_test"
path = "tests/iso_verification_test.rs"
[[test]]
name = "issue_93_utf8_panic"
path = "tests/issue_93_utf8_panic.rs"
[[test]]
name = "jpeg_extraction_regression_test"
path = "tests/jpeg_extraction_regression_test.rs"
[[test]]
name = "linearized_xref_test"
path = "tests/linearized_xref_test.rs"
[[test]]
name = "memory_optimization_integration"
path = "tests/memory_optimization_integration.rs"
[[test]]
name = "memory_optimization_tests"
path = "tests/memory_optimization_tests.rs"
[[test]]
name = "memory_stress_integration"
path = "tests/memory_stress_integration.rs"
[[test]]
name = "merge_font_mapping_test"
path = "tests/merge_font_mapping_test.rs"
[[test]]
name = "new_architecture_test"
path = "tests/new_architecture_test.rs"
[[test]]
name = "object_decryption_test"
path = "tests/object_decryption_test.rs"
[[test]]
name = "objects_integration_test"
path = "tests/objects_integration_test.rs"
[[test]]
name = "ocr_tests"
path = "tests/ocr_tests.rs"
[[test]]
name = "operations_test"
path = "tests/operations_test.rs"
[[test]]
name = "overlay_font_preservation_test"
path = "tests/overlay_font_preservation_test.rs"
[[test]]
name = "page_labels_integration_test"
path = "tests/page_labels_integration_test.rs"
[[test]]
name = "parser_comprehensive_test"
path = "tests/parser_comprehensive_test.rs"
[[test]]
name = "parser_edge_cases_integration"
path = "tests/parser_edge_cases_integration.rs"
[[test]]
name = "parser_malformed_comprehensive_test"
path = "tests/parser_malformed_comprehensive_test.rs"
[[test]]
name = "parser_objects_coverage"
path = "tests/parser_objects_coverage.rs"
[[test]]
name = "parser_reader_coverage"
path = "tests/parser_reader_coverage.rs"
[[test]]
name = "parser_stress_and_recovery_test"
path = "tests/parser_stress_and_recovery_test.rs"
[[test]]
name = "parser_tests"
path = "tests/parser_tests.rs"
[[test]]
name = "parser_version_compatibility_test"
path = "tests/parser_version_compatibility_test.rs"
[[test]]
name = "parser_writer_roundtrip"
path = "tests/parser_writer_roundtrip.rs"
[[test]]
name = "png_transparency_tests"
path = "tests/png_transparency_tests.rs"
[[test]]
name = "proptest_geometry"
path = "tests/proptest_geometry.rs"
[[test]]
name = "proptest_graphics"
path = "tests/proptest_graphics.rs"
[[test]]
name = "proptest_parser"
path = "tests/proptest_parser.rs"
[[test]]
name = "proptest_primitives"
path = "tests/proptest_primitives.rs"
[[test]]
name = "reader_integration_test"
path = "tests/reader_integration_test.rs"
[[test]]
name = "real_pdf_integration_tests"
path = "tests/real_pdf_integration_tests.rs"
[[test]]
name = "stream_syntax_test"
path = "tests/stream_syntax_test.rs"
[[test]]
name = "table_extraction_real_pdfs"
path = "tests/table_extraction_real_pdfs.rs"
[[test]]
name = "table_integration_test"
path = "tests/table_integration_test.rs"
[[test]]
name = "tagged_pdf_integration_test"
path = "tests/tagged_pdf_integration_test.rs"
[[test]]
name = "tesseract_ocr_tests"
path = "tests/tesseract_ocr_tests.rs"
[[test]]
name = "test_hybrid_reference_pdfs"
path = "tests/test_hybrid_reference_pdfs.rs"
[[test]]
name = "test_issue47_regression"
path = "tests/test_issue47_regression.rs"
[[test]]
name = "text_extraction_e2e_test"
path = "tests/text_extraction_e2e_test.rs"
[[test]]
name = "text_extraction_test"
path = "tests/text_extraction_test.rs"
[[test]]
name = "text_sanitization_test"
path = "tests/text_sanitization_test.rs"
[[test]]
name = "text_validation_coverage"
path = "tests/text_validation_coverage.rs"
[[test]]
name = "tracing_infrastructure"
path = "tests/tracing_infrastructure.rs"
[[test]]
name = "transparency_integration_test"
path = "tests/transparency_integration_test.rs"
[[test]]
name = "type0_font_parsing_security_test"
path = "tests/type0_font_parsing_security_test.rs"
[[test]]
name = "type0_font_parsing_test"
path = "tests/type0_font_parsing_test.rs"
[[test]]
name = "type0_page_integration_test"
path = "tests/type0_page_integration_test.rs"
[[test]]
name = "xref_recovery_test"
path = "tests/xref_recovery_test.rs"
[[test]]
name = "xref_stream_simple"
path = "tests/xref_stream_simple.rs"
[[bench]]
name = "encryption_benchmark"
path = "benches/encryption_benchmark.rs"
harness = false
[dependencies.aes]
version = "0.8"
[dependencies.bitflags]
version = "2.4"
[dependencies.cbc]
version = "0.1"
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.cipher]
version = "0.4"
[dependencies.flate2]
version = "1.0"
optional = true
[dependencies.image]
version = "0.25.6"
features = [
"png",
"jpeg",
"png",
"jpeg",
]
optional = true
default-features = false
[dependencies.lazy_static]
version = "1.4"
[dependencies.md5]
version = "0.8"
[dependencies.num_cpus]
version = "1.16"
[dependencies.quick-xml]
version = "0.31"
features = ["serialize"]
[dependencies.rand]
version = "0.9"
[dependencies.rayon]
version = "1.8"
optional = true
[dependencies.regex]
version = "1.10"
[dependencies.rusty-tesseract]
version = "1.1.10"
optional = true
[dependencies.serde]
version = "1.0"
features = [
"derive",
"derive",
]
[dependencies.serde_json]
version = "1.0"
optional = true
[dependencies.sha2]
version = "0.10"
[dependencies.subtle]
version = "2.6"
[dependencies.tempfile]
version = "3.8"
[dependencies.thiserror]
version = "2.0.12"
[dependencies.toml]
version = "0.9"
[dependencies.tracing]
version = "0.1"
[dependencies.unicode-normalization]
version = "0.1"
[dependencies.zeroize]
version = "1.8"
features = ["derive"]
[dev-dependencies.clap]
version = "4.4"
features = ["derive"]
[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]
[dev-dependencies.indicatif]
version = "0.17"
[dev-dependencies.proptest]
version = "1.7"
[dev-dependencies.serde_json]
version = "1.0"
[dev-dependencies.tempfile]
version = "3.8"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[target."cfg(unix)".dependencies.libc]
version = "0.2"
[target."cfg(windows)".dependencies.image]
version = "0.25.6"
features = [
"png",
"jpeg",
]
optional = true
default-features = false
[target."cfg(windows)".dependencies.rusty-tesseract]
version = "1.1.10"
optional = true
[target."cfg(windows)".dependencies.winapi]
version = "0.3"
features = [
"memoryapi",
"handleapi",
"winnt",
]