lopdf-0.34.0/.cargo_vcs_info.json 0000644 00000000136 00000000001 0012224 0 ustar {
"git": {
"sha1": "ba237d16835f1e89157584a85053dd19c403eb8f"
},
"path_in_vcs": ""
} lopdf-0.34.0/.chglog/CHANGELOG.tpl.md 0000644 0000000 0000000 00000000757 00726746425 0015005 0 ustar 0000000 0000000 {{ range .Versions }}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
* {{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}} lopdf-0.34.0/.chglog/config.yml 0000644 0000000 0000000 00000001016 00726746425 0014353 0 ustar 0000000 0000000 style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/J-F-Liu/lopdf
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^((\\w+)\\s.*)$"
pattern_maps:
- Subject
- Type
notes:
keywords:
- BREAKING CHANGE lopdf-0.34.0/.editorconfig 0000644 0000000 0000000 00000000302 00726746425 0013514 0 ustar 0000000 0000000 root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
[*.{md,pdf}]
trim_trailing_whitespace = false
lopdf-0.34.0/.gitattributes 0000644 0000000 0000000 00000000157 00726746425 0013742 0 ustar 0000000 0000000 * text eol=lf
*.rs text diff=rust
*.toml text diff=toml
*.pdf binary
Cargo.lock text
lopdf-0.34.0/.github/workflows/ci.yml 0000644 0000000 0000000 00000003505 00726746425 0015562 0 ustar 0000000 0000000 name: CI
on:
push:
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue-on-error || false }}
strategy:
matrix:
name:
- stable
- beta
- nightly
- "feat: no default features"
- "feat: all features"
- "feat: nom only"
include:
- name: beta
rust: beta
- name: nightly
rust: nightly
continue-on-error: true
- name: "feat: all features"
features: "--all-features"
- name: "feat: nom only"
features: "--no-default-features --features nom_parser"
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust || 'stable' }}
- name: Build
run: cargo build --verbose ${{ matrix.features }}
- name: Run tests
run: cargo test --verbose ${{ matrix.features }} -- --test-threads=1
pdfutil:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- name: Build
run: cargo build --verbose --manifest-path pdfutil/Cargo.toml
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- name: clippy for lopdf
run: cargo clippy
- name: clippy for pdfutil
run: cargo clippy --manifest-path pdfutil/Cargo.toml
lopdf-0.34.0/.gitignore 0000644 0000000 0000000 00000000047 00726746425 0013035 0 ustar 0000000 0000000 target
Cargo.lock
test*.pdf
.idea
*.pdf lopdf-0.34.0/.travis.yml 0000644 0000000 0000000 00000001026 00726746425 0013154 0 ustar 0000000 0000000 language: rust
cache: cargo
rust:
- stable
- beta
- nightly
script:
- cargo clean
- cargo +nightly fmt -- --check
- cargo check --verbose --no-default-features
- cargo check --verbose --features="chrono_time"
- cargo check --verbose --features="nom_parser"
- cargo test --verbose
- cargo test --verbose --features="nom_parser"
- cargo test --verbose --examples
- cargo clippy -- -D warnings
- cargo clippy -- -D warnings --features="nom_parser"
matrix:
allow_failures:
- rust: nightly
sudo: false
lopdf-0.34.0/.vscode/launch.json 0000644 0000000 0000000 00000000760 00726746425 0014555 0 ustar 0000000 0000000 {
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "lldb",
"program": "./pdfutil/target/debug/pdfutil",
"args": ["decompress", "-i", "/Users/Junfeng/Downloads/Lifetimes.pdf"],
"cwd": "${workspaceRoot}"
},
{
"type": "lldb-mi",
"request": "launch",
"name": "pdfutil",
"target": "./pdfutil/target/debug/pdfutil",
"arguments": "decompress -i /Users/Junfeng/Downloads/Lifetimes.pdf",
"cwd": "${workspaceRoot}"
}
]
}
lopdf-0.34.0/.vscode/settings.json 0000644 0000000 0000000 00000000177 00726746425 0015145 0 ustar 0000000 0000000 {
"editor.formatOnSave": true,
"[markdown]": {
"editor.formatOnSave": false
},
"search.exclude": {
"target": true
}
}
lopdf-0.34.0/CHANGELOG.md 0000644 0000000 0000000 00000061340 00726746425 0012661 0 ustar 0000000 0000000
## [v0.34.0](https://github.com/J-F-Liu/lopdf/compare/v0.33.0...v0.34.0) (2024-08-31)
### Add
* Add ASCII85 decoding ([#317](https://github.com/J-F-Liu/lopdf/issues/317))
* Add text extraction based on ToUnicode cmap ([#314](https://github.com/J-F-Liu/lopdf/issues/314))
* Add error handling to object stream ([#299](https://github.com/J-F-Liu/lopdf/issues/299))
* Add PDFDocEncoding ([#296](https://github.com/J-F-Liu/lopdf/issues/296))
### Cleanup
* Cleanup comments and cargo fmt ([#290](https://github.com/J-F-Liu/lopdf/issues/290))
### Detect
* Detect reference cycles when going through trailers ([#308](https://github.com/J-F-Liu/lopdf/issues/308))
* Detect reference cycles when parsing streams (with nom_parser) ([#300](https://github.com/J-F-Liu/lopdf/issues/300))
* Detect reference cycles when collecting page resources ([#298](https://github.com/J-F-Liu/lopdf/issues/298))
### Fix
* Fix unicode fonts extraction in extract text example. ([#315](https://github.com/J-F-Liu/lopdf/issues/315))
* Fix clippy warings
### Implement
* Implement encoding and decoding of text strings (PDF1.7 section 7.9.2.2) ([#297](https://github.com/J-F-Liu/lopdf/issues/297))
### Improve
* Improve error handling ([#307](https://github.com/J-F-Liu/lopdf/issues/307))
### Refactor
* Refactor get_or_create_resources() ([#291](https://github.com/J-F-Liu/lopdf/issues/291))
### Release
* Release 0.34
### Replace
* Replace unwrap with returning error ([#310](https://github.com/J-F-Liu/lopdf/issues/310))
* Replace LinkedHashMap with IndexMap ([#293](https://github.com/J-F-Liu/lopdf/issues/293))
### Update
* Update dependencies ([#309](https://github.com/J-F-Liu/lopdf/issues/309))
* Update readme of pdfutil ([#295](https://github.com/J-F-Liu/lopdf/issues/295))
## [v0.33.0](https://github.com/J-F-Liu/lopdf/compare/v0.32.0...v0.33.0) (2024-08-31)
### Accept
* Accept comments in content parsing ([#261](https://github.com/J-F-Liu/lopdf/issues/261))
### Added
* Added a new feature to get images info from the pdf page. ([#275](https://github.com/J-F-Liu/lopdf/issues/275))
### Async
* Async Examples ([#266](https://github.com/J-F-Liu/lopdf/issues/266))
### AsyncReader
* AsyncReader ([#265](https://github.com/J-F-Liu/lopdf/issues/265))
### Fix
* Fix parse outline failed, the key ’D‘ might be an object id ([#274](https://github.com/J-F-Liu/lopdf/issues/274))
* Fix parse outline failed([#270](https://github.com/J-F-Liu/lopdf/issues/270)) ([#271](https://github.com/J-F-Liu/lopdf/issues/271))
### Indexmap
* indexmap use in TOC for sorted TOC ([#267](https://github.com/J-F-Liu/lopdf/issues/267))
### Release
* Release 0.33
### Replace
* Replace md5 with md-5 ([#272](https://github.com/J-F-Liu/lopdf/issues/272))
## [v0.32.0](https://github.com/J-F-Liu/lopdf/compare/v0.31.0...v0.32.0) (2024-08-31)
### Add
* Add debug format for hexadecimal ([#240](https://github.com/J-F-Liu/lopdf/issues/240))
### Added
* Added big generation value parsing ([#257](https://github.com/J-F-Liu/lopdf/issues/257))
### Added
* added object parse to get_page_fonts ([#249](https://github.com/J-F-Liu/lopdf/issues/249))
* added meta info decryption ([#237](https://github.com/J-F-Liu/lopdf/issues/237))
### Fix
* Fix clippy warning and format code
* Fix clippy warnings
* Fix typo in README.md ([#251](https://github.com/J-F-Liu/lopdf/issues/251))
### Fixed
* Fixed parsing of the PDFs with incorrect xrefs to indirect objects ([#254](https://github.com/J-F-Liu/lopdf/issues/254))
### Fixed
* fixed clippy issues ([#238](https://github.com/J-F-Liu/lopdf/issues/238))
### Handle
* Handle references to arrays in get_page_contents() ([#245](https://github.com/J-F-Liu/lopdf/issues/245))
### Object
* Object and related types implement PartialEq ([#236](https://github.com/J-F-Liu/lopdf/issues/236))
### Release
* Release 0.32
## [v0.31.0](https://github.com/J-F-Liu/lopdf/compare/v0.30.0...v0.31.0) (2023-05-10)
### Add
* Add example of page rotation ([#230](https://github.com/J-F-Liu/lopdf/issues/230))
* Add decryption of documents using RC4 encryption. ([#228](https://github.com/J-F-Liu/lopdf/issues/228))
### Annotate
* Annotate feature usage ([#229](https://github.com/J-F-Liu/lopdf/issues/229))
### Fix
* Fix typo in README.md ([#233](https://github.com/J-F-Liu/lopdf/issues/233))
### PDF
* PDF 2.0 is now a free specification
### Release
* Release 0.31
### Remove
* Remove extraneous `Q` operation from insert_image ([#227](https://github.com/J-F-Liu/lopdf/issues/227))
## [v0.30.0](https://github.com/J-F-Liu/lopdf/compare/v0.29.0...v0.30.0) (2023-04-09)
### Add
* Add support for extracting TOC, Outlines and NamedDestinations ([#211](https://github.com/J-F-Liu/lopdf/issues/211))
* Add example extract_text ([#212](https://github.com/J-F-Liu/lopdf/issues/212))
* Add get_encrypted and is_encrypted ([#210](https://github.com/J-F-Liu/lopdf/issues/210))
* Add load_filtered method ([#198](https://github.com/J-F-Liu/lopdf/issues/198))
* Add as_string method to Object ([#196](https://github.com/J-F-Liu/lopdf/issues/196))
### Adding
* Adding Comments to examples ([#220](https://github.com/J-F-Liu/lopdf/issues/220))
### Fix
* Fix clippy warning
* Fix cliippy warnings
* Fix datetime using time crate
* Fix Cargo.toml ([#213](https://github.com/J-F-Liu/lopdf/issues/213))
* Fix ci build issue ([#209](https://github.com/J-F-Liu/lopdf/issues/209))
* Fix extract_text to split text at word boundaries.
* Fix embed_image feature
### Make
* Make some more objects public. ([#199](https://github.com/J-F-Liu/lopdf/issues/199))
### Readd
* Readd accidently deleted pdf files in assets ([#204](https://github.com/J-F-Liu/lopdf/issues/204))
### Release
* Release 0.30
### Remove
* Remove obsolete lifetime
### Replace
* Replace unmaitained encoding crate with encoding_rs ([#222](https://github.com/J-F-Liu/lopdf/issues/222))
### Set
* Set default to nom_parser and rayon ([#208](https://github.com/J-F-Liu/lopdf/issues/208))
### Update
* Update time dependency ([#206](https://github.com/J-F-Liu/lopdf/issues/206))
* Update nom dependency
* Update time dependency
* Update edition and some dependencies.
## [v0.29.0](https://github.com/J-F-Liu/lopdf/compare/v0.27.0...v0.29.0) (2023-04-09)
### Add
* Add function get_page_annotations and include an example ([#184](https://github.com/J-F-Liu/lopdf/issues/184))
### Added
* Added documentation and improved tests ([#178](https://github.com/J-F-Liu/lopdf/issues/178))
### Allow
* Allow mutable access to the document catalog ([#189](https://github.com/J-F-Liu/lopdf/issues/189))
### Extend
* Extend match layout change and Full bookmark example in merge. ([#179](https://github.com/J-F-Liu/lopdf/issues/179))
### Fix
* Fix nom parser
* Fix clippy warnings
* Fix add_barcode example
* Fix Incremental.pdf
* Fix documentation issues and make README testable ([#171](https://github.com/J-F-Liu/lopdf/issues/171))
* Fix pdfutil build error
* Fix `extend` definition confusion bug ([#161](https://github.com/J-F-Liu/lopdf/issues/161))
### Fixed
* Fixed [#175](https://github.com/J-F-Liu/lopdf/issues/175) and some clippy issues. ([#182](https://github.com/J-F-Liu/lopdf/issues/182))
### Guard
* Guard example based on if the "parser" feature is enabled ([#173](https://github.com/J-F-Liu/lopdf/issues/173))
### Made
* made XREF parser accept an optional space character after 'xref' ([#167](https://github.com/J-F-Liu/lopdf/issues/167))
### Make
* Make add_xobject follow references ([#187](https://github.com/J-F-Liu/lopdf/issues/187))
* Make xref public ,fix line endings and Fix Xref output so Adobe will open them again. ([#181](https://github.com/J-F-Liu/lopdf/issues/181))
### Merge
* Merge branch 'master' of https://github.com/J-F-Liu/lopdf
### Release
* Release 0.29
* Release 0.28
### Remove
* Remove --no-default-features test
### Remove
* remove unneccessary time 0.1 dependency ([#163](https://github.com/J-F-Liu/lopdf/issues/163))
### Reorder
* Reorder Pages before Renumbering Objects. ([#193](https://github.com/J-F-Liu/lopdf/issues/193))
### Support
* Support Incremental Updates ([#176](https://github.com/J-F-Liu/lopdf/issues/176))
### Switch
* switch to single-precision floating point ([#190](https://github.com/J-F-Liu/lopdf/issues/190))
### Update
* Update itoa dependency to 1.0 ([#162](https://github.com/J-F-Liu/lopdf/issues/162))
## [v0.27.0](https://github.com/J-F-Liu/lopdf/compare/v0.26.0...v0.27.0) (2021-12-16)
### Add
* Add GitHub Actions build matrix ([#127](https://github.com/J-F-Liu/lopdf/issues/127))
* Add Change Log
### Added
* Added Object::as_float() to convert numerical values to float. ([#124](https://github.com/J-F-Liu/lopdf/issues/124))
* Added Object::as_bool ([#123](https://github.com/J-F-Liu/lopdf/issues/123))
### Avoid
* Avoid panic when encounters negative stream length
### Bookmarks
* Bookmarks ([#135](https://github.com/J-F-Liu/lopdf/issues/135))
### Change
* Change indent_style to space
### Check
* Check stream length
### Do
* Do not limit Real precision to two digits ([#155](https://github.com/J-F-Liu/lopdf/issues/155))
### Fix
* Fix document save race in parser_aux::load_and_save and creator::create_document ([#151](https://github.com/J-F-Liu/lopdf/issues/151))
* Fix clippy warnings & add clippy build job ([#128](https://github.com/J-F-Liu/lopdf/issues/128))
### Preserve
* Preserve the eol characters in literal strings ([#131](https://github.com/J-F-Liu/lopdf/issues/131))
### Reduce
* Reduce allocation by reusing the iterator ([#129](https://github.com/J-F-Liu/lopdf/issues/129))
### Release
* Release 0.27
* Release pdfutil 0.4
### Replace
* Replace lzw with weezl ([#140](https://github.com/J-F-Liu/lopdf/issues/140))
### Return
* Return early on error in `Stream::filters` ([#130](https://github.com/J-F-Liu/lopdf/issues/130))
### Unwrap
* Unwrap the text ([#119](https://github.com/J-F-Liu/lopdf/issues/119))
### Update
* Update nom to 6.0 ([#126](https://github.com/J-F-Liu/lopdf/issues/126))
## [v0.26.0](https://github.com/J-F-Liu/lopdf/compare/v0.25.0...v0.26.0) (2020-09-29)
### Add
* Add as_str, as_str_mut methods to Object ([#107](https://github.com/J-F-Liu/lopdf/issues/107))
### Dtoa
* dtoa may write real number in exponential format which is not allowed in PDF
### Genericize
* Genericize Content to allow AsRef<[Operation]> ([#111](https://github.com/J-F-Liu/lopdf/issues/111))
### Make
* Make pom dependency optional (but default) ([#112](https://github.com/J-F-Liu/lopdf/issues/112))
* Make rayon dependency optional ([#108](https://github.com/J-F-Liu/lopdf/issues/108))
### Merge
* Merge document PDF logic with some fixes ([#117](https://github.com/J-F-Liu/lopdf/issues/117))
### Various
* Various improvements, updated libraries and image features ([#118](https://github.com/J-F-Liu/lopdf/issues/118))
## [v0.25.0](https://github.com/J-F-Liu/lopdf/compare/v0.24.0...v0.25.0) (2020-06-25)
### Add
* add indexing checks ([#98](https://github.com/J-F-Liu/lopdf/issues/98))
### Add
* Add a test for [#93](https://github.com/J-F-Liu/lopdf/issues/93) ([#95](https://github.com/J-F-Liu/lopdf/issues/95))
### Bugfix
* Bugfix for xref_start. ([#105](https://github.com/J-F-Liu/lopdf/issues/105))
### Check
* check that the buffer is big enough for startxref ([#93](https://github.com/J-F-Liu/lopdf/issues/93))
### Create
* Create rust.yml ([#104](https://github.com/J-F-Liu/lopdf/issues/104))
### Extend
* extend recursion limit to non-local references ([#100](https://github.com/J-F-Liu/lopdf/issues/100))
### Fix
* Fix compilation error&test error ([#102](https://github.com/J-F-Liu/lopdf/issues/102))
### Keep
* keep looking for the last pattern ([#94](https://github.com/J-F-Liu/lopdf/issues/94))
### Limit
* Limit allowed bracket depth. ([#97](https://github.com/J-F-Liu/lopdf/issues/97))
### Limit
* limit recursion to the number of objects ([#92](https://github.com/J-F-Liu/lopdf/issues/92))
### Move
* Move bracket depth checking into parsers. ([#101](https://github.com/J-F-Liu/lopdf/issues/101))
### Release
* Release 0.25
### Return
* Return Result from as_array_mut() ([#106](https://github.com/J-F-Liu/lopdf/issues/106))
### Update
* Update itoa and linked-hash-map ([#91](https://github.com/J-F-Liu/lopdf/issues/91))
## [v0.24.0](https://github.com/J-F-Liu/lopdf/compare/v0.23.0...v0.24.0) (2020-02-17)
### Compute
* Compute an accurate iterator size when the page tree is sane.
### Fix
* Fix datetime parser ([#89](https://github.com/J-F-Liu/lopdf/issues/89))
### More
* More permissive datetime parsing ([#90](https://github.com/J-F-Liu/lopdf/issues/90))
### Release
* Release 0.24
### Validate
* Validate expected id in pom parser.
* Validate the expected id when reading indirect objects.
## [v0.23.0](https://github.com/J-F-Liu/lopdf/compare/v0.22.0...v0.23.0) (2019-07-14)
### Adapt
* Adapt pom parser.
### Add
* Add error descriptions.
* Add a proper error type and remove some more panics.
### Allow
* Allow loading a document from a memory slice.
### Avoid
* Avoid allocating an intermediate collection for iteration.
* Avoid unwraps when already returning an Option for failure.
### Error
* Error signaling around compression and image handling.
### Escape
* Escape fix ([#68](https://github.com/J-F-Liu/lopdf/issues/68))
### Export
* Export dereference function as it is useful for PDF consumers.
* Export filters module.
### Get_font_encoding
* get_font_encoding seems more at home with Dictionary.
### Handle
* Handle stream filter chains ([#66](https://github.com/J-F-Liu/lopdf/issues/66))
### Hex
* Hex fix ([#67](https://github.com/J-F-Liu/lopdf/issues/67))
### Implement
* Implement LZW decompression.
### Improve
* Improve hex parsing performance.
### Make
* Make a page iterator.
* Make Reader::read consume the Reader.
* Make content operations faillible.
### Protect
* Protect against reference loops.
* Protect against a corrupted page tree.
### Refactor
* Refactor a bit to allow a utility function.
### Release
* Release 0.23.0
### Remove
* Remove intermediate assignation.
* Remove unsafe code around FilterType.
* Remove unsafe code on get_object_mut.
* Remove some 'if let' for readability.
* Remove more panic paths in xref parsing.
### Replace
* Replace unwraps in processor.rs.
### Return
* Return results when appropriate.
### Separate
* Separate decompression into two functions.
### Take
* Take care of panic that I actually hit on the pom side.
* Take care of creator.rs.
### Unify
* Unify buffer creation.
### Use
* Use lifetime ellision.
* Use TryInto.
* Use writeln where appropriate.
* Use error enum in reader.
* Use stable cloned.
## [v0.22.0](https://github.com/J-F-Liu/lopdf/compare/v0.21.0...v0.22.0) (2019-05-13)
### Add
* Add parsing benchmark.
* Add nom dependency.
### Also
* Also test with nom parsing feature enabled.
### Array
* Array and dictionary parsing.
### Avoid
* Avoid using format! when writing.
### Be
* Be explicit about trait objects.
### Boolean
* Boolean and null parsing.
### Content
* Content parsing.
### Duplicate
* Duplicate pom parser for incremental replacement with nom 5.
### Ease
* Ease off on rayon a bit.
### Escape
* Escape sequence parsing.
### Extern
* extern crate is not required anymore with 2018 edition.
### Fix
* Fix last ugly parser.
* Fix octal parser.
* Fix pdfutil build
### Float
* Float parsing.
### Header
* Header parsing.
### Hex
* Hex string parsing.
### Indirect
* Indirect object and stream parsing.
### Literal
* Literal string syntax.
### Make
* Make sure Stream.start_position is relative to the whole file.
### Merge
* Merge remote-tracking branch 'upstream/master' into nom5
* Merge remote-tracking branch 'upstream/master' into nom5
### More
* More 2018 edition lints.
* More cleanup.
* More cleanup.
* More simplifications.
### Object
* Object id and reference parsing.
### Octal
* Octal and hexadecimal parsing.
### Parallel
* Parallel object stream parsing.
### Rayon
* Rayon usage proof of concept.
### Release
* Release 0.22.0
### Remove
* Remove pom dependency in tests.
### Replace
* Replace name parser.
### Resolve
* Resolve name collisions.
### Simplify
* Simplify lifetime annotations.
### Slowly
* Slowly replace the cute pom parser with nom.
### Trailer
* Trailer and xref start.
### Turns
* Turns out "contained" already exists in nom.
### Unify
* Unify both variants of the parsing functions.
### Use
* Use a BufWriter when saving to path.
* Use parse_at(&self.buffer, offset) to read indirect_object
* Use nom digit testing functions.
* Use lifetime ellision.
* Use nom sequence operators.
### Useless
* Useless move.
### Xref
* Xref stream and trailer parsing.
* Xref parsing.
## [v0.21.0](https://github.com/J-F-Liu/lopdf/compare/v0.20.0...v0.21.0) (2019-04-26)
### Avoid
* Avoid allocating a String.
### Check
* Check offsets read from file to avoid panics
* Check and correct Size entry of trailer dictionary
### Clean
* Clean up bytes_to_string, string_to_bytes iterators
### Fix
* Fix clippy warnings
* Fix .editorconfig
### Fixed
* fixed finally
### Redundant
* Redundant imports with 2018 edition.
### Release
* Release 0.21.0
### Update
* Update example
* Update Cargo.toml
### Use
* Use env_logger in pdfutil
## [v0.20.0](https://github.com/J-F-Liu/lopdf/compare/v0.19.0...v0.20.0) (2019-03-07)
### Release
* Release 0.20.0
### Replace
* Replace println with log macros
### Use
* Use Rust 2018
* Use pom 3.0
## [v0.19.0](https://github.com/J-F-Liu/lopdf/compare/v0.18.0...v0.19.0) (2018-10-24)
### Allow
* Allow xref section has zero entries
### Dictionary
* Dictionary key type changed to Vec
### Format
* Format code with rustfmt
### Improve
* Improve codestyle (simplify loops, remove closures, use is_empty() etc.)
### Move
* Move image dependency to embed_image feature
### Release
* Release 0.19.0
### Skip
* Skip corrupt deflate stream
## [v0.18.0](https://github.com/J-F-Liu/lopdf/compare/v0.17.0...v0.18.0) (2018-10-05)
### Able
* Able to read stream when it's length is in object stream
### Adress
* Adress timezone formatting problem from [#34](https://github.com/J-F-Liu/lopdf/issues/34)
### Insert
* insert image on page
## [v0.17.0](https://github.com/J-F-Liu/lopdf/compare/v0.16.0...v0.17.0) (2018-09-19)
### Make
* Make chrono crate optional
### Release
* Release 0.17.0
### Update
* Update add_barcode example
## [v0.16.0](https://github.com/J-F-Liu/lopdf/compare/v0.15.3...v0.16.0) (2018-09-18)
### Add
* Add form xobject to page
* Add extract_stream subcommand
### Compress
* Compress created Form xobject
### Compress
* compress page content after change
### Fix
* Fix collect_fonts_from_resources for referenced resources
* Fix add xobject to page resources as direct object
## [v0.15.3](https://github.com/J-F-Liu/lopdf/compare/v0.15.0...v0.15.3) (2018-09-14)
### Decompress
* Decompress Form XObject
### Disable
* Disable auto format markdown
### Fix
* Fix bug in reading incremental updated document
* Fix build warning
* Fix string_to_bytes method
### Hexadecimal
* Hexadecimal strings can contain white space.
### Remove
* Remove println in extract_text
### Update
* Update example code
* Update example
## [v0.15.0](https://github.com/J-F-Liu/lopdf/compare/v0.14.1...v0.15.0) (2018-02-04)
### Add
* add `get_object_mut`
* add method as_array_mut
### Extract
* Extract text from specified pages
### Replace
* Replace text of specified page
## [v0.14.1](https://github.com/J-F-Liu/lopdf/compare/v0.13.0...v0.14.1) (2017-11-03)
### Add
* Add `impl From<_> for Object` for more numeric types
* Add an Object::string_literal constructor
* Add a `dictionary!` macro that creates a Dictionary
* Add `impl From for Object` creating Object::Reference
### Derive
* Derive Clone for lopdf::Document
### Release
* Release 0.14.0
### Remove
* Remove the Seek bound on Document::save_to
## [v0.13.0](https://github.com/J-F-Liu/lopdf/compare/v0.11.0...v0.13.0) (2017-10-02)
### Avoid
* Avoid decompress flate stream which has Subtype
### Debug
* Debug with lldb
### Fix
* Fix get_object for created document
### Ignore
* Ignore invalid objects when reading all object in xref table
### Impl
* impl fmt::Debug for Object
### Pdfutil
* pdfutil add extract_pages command
### Read
* Read optional space at the end of xref subsection header line
### Release
* Release 0.13.0
* Release 0.12.0
### Store
* Store compressed stream objects and normal objects together
## [v0.11.0](https://github.com/J-F-Liu/lopdf/compare/v0.10.0...v0.11.0) (2017-08-21)
### Release
* Release 0.11.0
### Use
* Use itoa and dtoa to improve writing performance
## [v0.10.0](https://github.com/J-F-Liu/lopdf/compare/v0.9.0...v0.10.0) (2017-07-20)
### Added
* Added optional allows_compression for Stream object
### Release
* Release 0.10.0
## [v0.9.0](https://github.com/J-F-Liu/lopdf/compare/v0.8.0...v0.9.0) (2017-05-24)
### Add
* Add pdfutil readme
### Added
* Added unit test for load_from() and save_to()
* Added Document::with_version + refactored save() and load()
* Added Debug trait for lopdf::Document
### Apply
* Apply multiple operations in one command
### Build
* Build with Rust stable
* Build with Rust beta
### Fix
* Fix delete_zero_length_streams
### Fixed
* Fixed unit tests
* Fixed breaking API changes
### Release
* Release 0.9.0
## [v0.8.0](https://github.com/J-F-Liu/lopdf/compare/v0.7.0...v0.8.0) (2017-03-16)
### Change
* Change Name(String) to Name(Vec)
### Delete_object
* delete_object and delete_unused_objects
### Get_pages
* get_pages and delete_pages
### Handle
* Handle zero length stream
### Release
* Release 0.8.0
### Traverse
* Traverse objects from trailer recursively
## [v0.7.0](https://github.com/J-F-Liu/lopdf/compare/v0.6.0...v0.7.0) (2017-03-07)
### Add
* Add Content::decode() function
### Build
* Build on Rust 1.17
### Create
* Create String object for DateTime
### Parse
* Parse PDF datetime value
### Read
* Read xref stream in hybrid-reference file
### Update
* Update create_document example
* Update README
## [v0.6.0](https://github.com/J-F-Liu/lopdf/compare/v0.5.0...v0.6.0) (2017-02-16)
### Add
* Add Stream::decompressed_content() method
### Read
* Read previous Xrefs of linearized or incremental updated document
## [v0.5.0](https://github.com/J-F-Liu/lopdf/compare/v0.4.0...v0.5.0) (2017-02-10)
### Add
* Add size field to Xref
* Add Xref struct
### Decode
* Decode PNG frame after FlateDecode
### Read
* Read compressed objects from object stream
* Read xref stream
### Update
* Update README
### Use
* Use pom 0.9.0
### XrefEntry
* XrefEntry as enum type
## [v0.4.0](https://github.com/J-F-Liu/lopdf/compare/v0.3.0...v0.4.0) (2017-01-29)
### Add
* Add Operation constructor
* Add modify_text test
* Add travis-ci build status
* Add FAQ in Readme
* Add print_xref_size() for debuging
### Decode
* Decode content stream
### Encode
* Encode content operations
### Fix
* Fix load_document test
* Fix https://github.com/rust-lang/rust/issues/39177
### Optimize
* Optimize parser code
### Solve
* Solve mutual reference problem between Pages and Page objects
### Trigger
* Trigger new release to pass build on docs.rs
### Update
* Update create PDF example
## [v0.3.0](https://github.com/J-F-Liu/lopdf/compare/v0.2.0...v0.3.0) (2017-01-18)
### Add
* Add compress/decompress subcommands to pdfutil
### Create
* create PDF parser using pom instead of nom
### Dictionary
* Dictionary preserve key insert order
### Update
* Update README
* Update parser to use pom 0.6.0
### Use
* Use reader to get stream length if it is a reference object
## [v0.2.0](https://github.com/J-F-Liu/lopdf/compare/v0.1.0...v0.2.0) (2017-01-05)
### Add
* Add pdfutil program
### Fix
* Fix parsing PDF array error
### Improve
* Improve documentation
## v0.1.0 (2016-12-23)
### Editor
* Editor config
### Impl
* impl Document add_object method
### Improve
* Improve Document::save functional type
### Initial
* Initial commit
### PDF
* PDF objects and document definition
### Parse
* Parse and load PDF document
### Read
* Read objects from xref table instead of sequentially from file stream
### Save
* Save PDF document to file
### Store
* Store max_id as a field of document
lopdf-0.34.0/Cargo.lock 0000644 00000135565 00000000001 0010216 0 ustar # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "adler2"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "aligned-vec"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle",
"windows-sys 0.52.0",
]
[[package]]
name = "anyhow"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
[[package]]
name = "arg_enum_proc_macro"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "arrayvec"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "autocfg"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "av1-grain"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
dependencies = [
"anyhow",
"arrayvec",
"log",
"nom",
"num-rational",
"v_frame",
]
[[package]]
name = "avif-serialize"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
dependencies = [
"arrayvec",
]
[[package]]
name = "backtrace"
version = "0.3.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide 0.7.4",
"object",
"rustc-demangle",
]
[[package]]
name = "bit_field"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bitstream-io"
version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "bstr"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
dependencies = [
"memchr",
"regex-automata",
"serde",
]
[[package]]
name = "built"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4"
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "byteorder-lite"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
[[package]]
name = "cc"
version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [
"jobserver",
"libc",
"shlex",
]
[[package]]
name = "cfg-expr"
version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
dependencies = [
"smallvec",
"target-lexicon",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"num-traits",
"windows-targets 0.52.6",
]
[[package]]
name = "clap"
version = "4.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "color_quant"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
name = "colorchoice"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "crc32fast"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crunchy"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "deranged"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
[[package]]
name = "dirs"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.48.0",
]
[[package]]
name = "either"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "encoding_rs"
version = "0.8.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
dependencies = [
"cfg-if",
]
[[package]]
name = "env_filter"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
dependencies = [
"log",
"regex",
]
[[package]]
name = "env_logger"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
dependencies = [
"anstream",
"anstyle",
"env_filter",
"humantime",
"log",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "exr"
version = "1.72.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4"
dependencies = [
"bit_field",
"flume",
"half",
"lebe",
"miniz_oxide 0.7.4",
"rayon-core",
"smallvec",
"zune-inflate",
]
[[package]]
name = "fastrand"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "fdeflate"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645"
dependencies = [
"simd-adler32",
]
[[package]]
name = "flate2"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
dependencies = [
"crc32fast",
"miniz_oxide 0.8.0",
]
[[package]]
name = "flume"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
"spin",
]
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "getrandom"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "gif"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
dependencies = [
"color_quant",
"weezl",
]
[[package]]
name = "gimli"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
[[package]]
name = "half"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
dependencies = [
"cfg-if",
"crunchy",
]
[[package]]
name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "humantime"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "iana-time-zone"
version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "image"
version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10"
dependencies = [
"bytemuck",
"byteorder-lite",
"color_quant",
"exr",
"gif",
"image-webp",
"num-traits",
"png",
"qoi",
"ravif",
"rayon",
"rgb",
"tiff",
"zune-core",
"zune-jpeg",
]
[[package]]
name = "image-webp"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904"
dependencies = [
"byteorder-lite",
"quick-error",
]
[[package]]
name = "imgref"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126"
[[package]]
name = "indexmap"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
name = "interpolate_name"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itertools"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "jobserver"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
dependencies = [
"libc",
]
[[package]]
name = "jpeg-decoder"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
[[package]]
name = "js-sys"
version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "lebe"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "libc"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libfuzzer-sys"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7"
dependencies = [
"arbitrary",
"cc",
"once_cell",
]
[[package]]
name = "libredox"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
"bitflags 2.6.0",
"libc",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "lock_api"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "loop9"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
dependencies = [
"imgref",
]
[[package]]
name = "lopdf"
version = "0.34.0"
dependencies = [
"chrono",
"clap",
"encoding_rs",
"env_logger",
"flate2",
"image",
"indexmap",
"itoa",
"log",
"md-5",
"nom",
"pom",
"rangemap",
"rayon",
"serde",
"serde_json",
"shellexpand",
"tempfile",
"time",
"tokio",
"weezl",
]
[[package]]
name = "maybe-rayon"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
dependencies = [
"cfg-if",
]
[[package]]
name = "md-5"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
"cfg-if",
"digest",
]
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
dependencies = [
"adler",
"simd-adler32",
]
[[package]]
name = "miniz_oxide"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
"adler2",
]
[[package]]
name = "new_debug_unreachable"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
name = "noop_proc_macro"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
[[package]]
name = "num-bigint"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
dependencies = [
"num-integer",
"num-traits",
]
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-derive"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
dependencies = [
"num-bigint",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "object"
version = "0.36.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pin-project-lite"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]]
name = "pkg-config"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "png"
version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1"
dependencies = [
"bitflags 1.3.2",
"crc32fast",
"fdeflate",
"flate2",
"miniz_oxide 0.7.4",
]
[[package]]
name = "pom"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c972d8f86e943ad532d0b04e8965a749ad1d18bb981a9c7b3ae72fe7fd7744b"
dependencies = [
"bstr",
]
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
"zerocopy",
]
[[package]]
name = "proc-macro2"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "profiling"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"
dependencies = [
"profiling-procmacros",
]
[[package]]
name = "profiling-procmacros"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
dependencies = [
"quote",
"syn",
]
[[package]]
name = "qoi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
dependencies = [
"bytemuck",
]
[[package]]
name = "quick-error"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]]
name = "quote"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "rangemap"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684"
[[package]]
name = "rav1e"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
dependencies = [
"arbitrary",
"arg_enum_proc_macro",
"arrayvec",
"av1-grain",
"bitstream-io",
"built",
"cfg-if",
"interpolate_name",
"itertools",
"libc",
"libfuzzer-sys",
"log",
"maybe-rayon",
"new_debug_unreachable",
"noop_proc_macro",
"num-derive",
"num-traits",
"once_cell",
"paste",
"profiling",
"rand",
"rand_chacha",
"simd_helpers",
"system-deps",
"thiserror",
"v_frame",
"wasm-bindgen",
]
[[package]]
name = "ravif"
version = "0.11.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd"
dependencies = [
"avif-serialize",
"imgref",
"loop9",
"quick-error",
"rav1e",
"rgb",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_users"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"libredox",
"thiserror",
]
[[package]]
name = "regex"
version = "1.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]]
name = "rgb"
version = "0.8.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
dependencies = [
"bytemuck",
]
[[package]]
name = "rustc-demangle"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustix"
version = "0.38.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
dependencies = [
"bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.52.0",
]
[[package]]
name = "ryu"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_spanned"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d"
dependencies = [
"serde",
]
[[package]]
name = "shellexpand"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b"
dependencies = [
"dirs",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "simd-adler32"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "simd_helpers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
dependencies = [
"quote",
]
[[package]]
name = "smallvec"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
dependencies = [
"lock_api",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "system-deps"
version = "6.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
dependencies = [
"cfg-expr",
"heck",
"pkg-config",
"toml",
"version-compare",
]
[[package]]
name = "target-lexicon"
version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tempfile"
version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [
"cfg-if",
"fastrand",
"once_cell",
"rustix",
"windows-sys 0.59.0",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tiff"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e"
dependencies = [
"flate2",
"jpeg-decoder",
"weezl",
]
[[package]]
name = "time"
version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
"num-conv",
"powerfmt",
"serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",
]
[[package]]
name = "tokio"
version = "1.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
dependencies = [
"backtrace",
"bytes",
"pin-project-lite",
"tokio-macros",
]
[[package]]
name = "tokio-macros"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "toml"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit",
]
[[package]]
name = "toml_datetime"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.22.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
]
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "v_frame"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
dependencies = [
"aligned-vec",
"num-traits",
"wasm-bindgen",
]
[[package]]
name = "version-compare"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "weezl"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm 0.48.5",
"windows_aarch64_msvc 0.48.5",
"windows_i686_gnu 0.48.5",
"windows_i686_msvc 0.48.5",
"windows_x86_64_gnu 0.48.5",
"windows_x86_64_gnullvm 0.48.5",
"windows_x86_64_msvc 0.48.5",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f"
dependencies = [
"memchr",
]
[[package]]
name = "zerocopy"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "zune-core"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
[[package]]
name = "zune-inflate"
version = "0.2.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
dependencies = [
"simd-adler32",
]
[[package]]
name = "zune-jpeg"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768"
dependencies = [
"zune-core",
]
lopdf-0.34.0/Cargo.toml 0000644 00000007036 00000000001 0010230 0 ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
name = "lopdf"
version = "0.34.0"
authors = [
"Junfeng Liu ",
"Emulator ",
]
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust library for PDF document manipulation."
homepage = "https://github.com/J-F-Liu/lopdf"
documentation = "https://docs.rs/crate/lopdf/"
readme = "README.md"
keywords = [
"pdf",
"editing",
"manipulation",
"merge",
]
categories = ["text-processing"]
license = "MIT"
repository = "https://github.com/J-F-Liu/lopdf.git"
[lib]
name = "lopdf"
path = "src/lib.rs"
[[example]]
name = "add_barcode"
path = "examples/add_barcode.rs"
required-features = ["pom_parser"]
[[example]]
name = "create"
path = "examples/create.rs"
[[example]]
name = "extract_text"
path = "examples/extract_text.rs"
required-features = ["serde"]
[[example]]
name = "extract_toc"
path = "examples/extract_toc.rs"
required-features = ["serde"]
[[example]]
name = "merge"
path = "examples/merge.rs"
[[example]]
name = "print_annotations"
path = "examples/print_annotations.rs"
required-features = ["default"]
[[example]]
name = "rotate"
path = "examples/rotate.rs"
required-features = ["nom_parser"]
[[test]]
name = "annotation"
path = "tests/annotation.rs"
[[test]]
name = "incremental_document"
path = "tests/incremental_document.rs"
[[test]]
name = "modify"
path = "tests/modify.rs"
required-features = ["pom_parser"]
[[test]]
name = "unicode"
path = "tests/unicode.rs"
[[test]]
name = "utils"
path = "tests/utils.rs"
[[bench]]
name = "datetime"
path = "benches/datetime.rs"
[[bench]]
name = "parse"
path = "benches/parse.rs"
[dependencies.chrono]
version = "0.4"
features = [
"std",
"clock",
]
optional = true
default-features = false
[dependencies.encoding_rs]
version = "0.8.32"
[dependencies.flate2]
version = "1.0"
[dependencies.image]
version = "0.25"
optional = true
[dependencies.indexmap]
version = "2.2.3"
[dependencies.itoa]
version = "1.0"
[dependencies.log]
version = "0.4"
[dependencies.md-5]
version = "0.10"
[dependencies.nom]
version = "7.1"
optional = true
[dependencies.pom]
version = "3.2"
optional = true
[dependencies.rangemap]
version = "1.5"
[dependencies.rayon]
version = "1.6"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
[dependencies.time]
version = "0.3"
features = [
"formatting",
"parsing",
]
[dependencies.tokio]
version = "1"
features = [
"fs",
"io-util",
]
optional = true
[dependencies.weezl]
version = "0.1"
[dev-dependencies.clap]
version = "4.0"
features = ["derive"]
[dev-dependencies.env_logger]
version = "0.11"
[dev-dependencies.serde_json]
version = "1.0"
[dev-dependencies.shellexpand]
version = "3.0"
[dev-dependencies.tempfile]
version = "3.3"
[features]
async = [
"tokio/rt-multi-thread",
"tokio/macros",
]
chrono_time = ["chrono"]
default = [
"chrono_time",
"nom_parser",
"rayon",
]
embed_image = ["image"]
nom_parser = ["nom"]
pom_parser = ["pom"]
serde = ["dep:serde"]
[badges.travis-ci]
repository = "J-F-Liu/lopdf"
lopdf-0.34.0/Cargo.toml.orig 0000644 0000000 0000000 00000003637 00726746425 0013744 0 ustar 0000000 0000000 [package]
authors = [
"Junfeng Liu ",
"Emulator ",
]
categories = ["text-processing"]
description = "A Rust library for PDF document manipulation."
documentation = "https://docs.rs/crate/lopdf/"
edition = "2021"
homepage = "https://github.com/J-F-Liu/lopdf"
keywords = ["pdf", "editing", "manipulation", "merge"]
license = "MIT"
name = "lopdf"
readme = "README.md"
repository = "https://github.com/J-F-Liu/lopdf.git"
version = "0.34.0"
[dependencies]
chrono = { version = "0.4", optional = true, features = [
"std",
"clock",
], default-features = false }
encoding_rs = "0.8.32"
flate2 = "1.0"
image = { version = "0.25", optional = true }
indexmap = "2.2.3"
itoa = "1.0"
log = "0.4"
md-5 = "0.10"
nom = { version = "7.1", optional = true }
pom = { version = "3.2", optional = true }
rayon = { version = "1.6", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
time = { version = "0.3", features = ["formatting", "parsing"] }
tokio = { version = "1", features = ["fs", "io-util"], optional = true }
weezl = "0.1"
rangemap = "1.5"
[dev-dependencies]
clap = { version = "4.0", features = ["derive"] }
env_logger = "0.11"
serde_json = "1.0"
shellexpand = "3.0"
tempfile = "3.3"
[features]
async = ["tokio/rt-multi-thread", "tokio/macros"]
chrono_time = ["chrono"]
default = ["chrono_time", "nom_parser", "rayon"]
embed_image = ["image"]
nom_parser = ["nom"]
pom_parser = ["pom"]
serde = ["dep:serde"]
[[example]]
name = "add_barcode"
required-features = ["pom_parser"]
[[example]]
name = "extract_toc"
required-features = ["serde"]
[[example]]
name = "extract_text"
required-features = ["serde"]
[[example]]
name = "print_annotations"
required-features = ["default"]
[[example]]
name = "rotate"
required-features = ["nom_parser"]
[[test]]
name = "modify"
required-features = ["pom_parser"]
[badges]
travis-ci = { repository = "J-F-Liu/lopdf" }
lopdf-0.34.0/LICENSE 0000644 0000000 0000000 00000002054 00726746425 0012052 0 ustar 0000000 0000000 MIT License
Copyright (c) 2016 Junfeng Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
lopdf-0.34.0/README.md 0000644 0000000 0000000 00000037762 00726746425 0012342 0 ustar 0000000 0000000 # lopdf
[](https://crates.io/crates/lopdf)
[](https://travis-ci.org/J-F-Liu/lopdf)
[](https://docs.rs/lopdf)
A Rust library for PDF document manipulation.
A useful reference for understanding the PDF file format and the
eventual usage of this library is the
[PDF 1.7 Reference Document](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf).
The PDF 2.0 specification is available [here](https://www.pdfa.org/announcing-no-cost-access-to-iso-32000-2-pdf-2-0/).
## Example Code
* Create PDF document
```rust
use lopdf::dictionary;
use lopdf::{Document, Object, Stream};
use lopdf::content::{Content, Operation};
// `with_version` specifes the PDF version this document complies with.
let mut doc = Document::with_version("1.5");
// Object IDs are used for cross referencing in PDF documents.
// `lopdf` helps keep track of them for us. They are simple integers.
// Calls to `doc.new_object_id` and `doc.add_object` return an object ID.
// "Pages" is the root node of the page tree.
let pages_id = doc.new_object_id();
// Fonts are dictionaries. The "Type", "Subtype" and "BaseFont" tags
// are straight out of the PDF spec.
//
// The dictionary macro is a helper that allows complex
// key-value relationships to be represented in a simpler
// visual manner, similar to a match statement.
// A dictionary is implemented as an IndexMap of Vec, and Object
let font_id = doc.add_object(dictionary! {
// type of dictionary
"Type" => "Font",
// type of font, type1 is simple postscript font
"Subtype" => "Type1",
// basefont is postscript name of font for type1 font.
// See PDF reference document for more details
"BaseFont" => "Courier",
});
// Font dictionaries need to be added into resource
// dictionaries in order to be used.
// Resource dictionaries can contain more than just fonts,
// but normally just contains fonts.
// Only one resource dictionary is allowed per page tree root.
let resources_id = doc.add_object(dictionary! {
// Fonts are actually triplely nested dictionaries. Fun!
"Font" => dictionary! {
// F1 is the font name used when writing text.
// It must be unique in the document. It does not
// have to be F1
"F1" => font_id,
},
});
// `Content` is a wrapper struct around an operations struct that contains
// a vector of operations. The operations struct contains a vector of
// that match up with a particular PDF operator and operands.
// Refer to the PDF spec for more details on the operators and operands
// Note, the operators and operands are specified in a reverse order
// from how they actually appear in the PDF file itself.
let content = Content {
operations: vec![
// BT begins a text element. It takes no operands.
Operation::new("BT", vec![]),
// Tf specifies the font and font size.
// Font scaling is complicated in PDFs.
// Refer to the spec for more info.
// The `into()` methods convert the types into
// an enum that represents the basic object types in PDF documents.
Operation::new("Tf", vec!["F1".into(), 48.into()]),
// Td adjusts the translation components of the text matrix.
// When used for the first time after BT, it sets the initial
// text position on the page.
// Note: PDF documents have Y=0 at the bottom. Thus 600 to print text near the top.
Operation::new("Td", vec![100.into(), 600.into()]),
// Tj prints a string literal to the page. By default, this is black text that is
// filled in. There are other operators that can produce various textual effects and
// colors
Operation::new("Tj", vec![Object::string_literal("Hello World!")]),
// ET ends the text element.
Operation::new("ET", vec![]),
],
};
// Streams are a dictionary followed by a (possibly encoded) sequence of bytes.
// What that sequence of bytes represents, depends on the context.
// The stream dictionary is set internally by lopdf and normally doesn't
// need to be manually manipulated. It contains keys such as
// Length, Filter, DecodeParams, etc.
let content_id = doc.add_object(Stream::new(dictionary! {}, content.encode().unwrap()));
// Page is a dictionary that represents one page of a PDF file.
// Its required fields are "Type", "Parent" and "Contents".
let page_id = doc.add_object(dictionary! {
"Type" => "Page",
"Parent" => pages_id,
"Contents" => content_id,
});
// Again, "Pages" is the root of the page tree. The ID was already created
// at the top of the page, since we needed it to assign to the parent element
// of the page dictionary.
//
// These are just the basic requirements for a page tree root object.
// There are also many additional entries that can be added to the dictionary,
// if needed. Some of these can also be defined on the page dictionary itself,
// and not inherited from the page tree root.
let pages = dictionary! {
// Type of dictionary
"Type" => "Pages",
// Vector of page IDs in document. Normally would contain more than one ID
// and be produced using a loop of some kind.
"Kids" => vec![page_id.into()],
// Page count
"Count" => 1,
// ID of resources dictionary, defined earlier
"Resources" => resources_id,
// A rectangle that defines the boundaries of the physical or digital media.
// This is the "page size".
"MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()],
};
// Using `insert()` here, instead of `add_object()` since the ID is already known.
doc.objects.insert(pages_id, Object::Dictionary(pages));
// Creating document catalog.
// There are many more entries allowed in the catalog dictionary.
let catalog_id = doc.add_object(dictionary! {
"Type" => "Catalog",
"Pages" => pages_id,
});
// The "Root" key in trailer is set to the ID of the document catalog,
// the remainder of the trailer is set during `doc.save()`.
doc.trailer.set("Root", catalog_id);
doc.compress();
// Store file in current working directory.
// Note: Line is excluded when running tests
if false {
doc.save("example.pdf").unwrap();
}
```
* Merge PDF documents
```rust
use lopdf::dictionary;
use std::collections::BTreeMap;
use lopdf::content::{Content, Operation};
use lopdf::{Document, Object, ObjectId, Stream, Bookmark};
pub fn generate_fake_document() -> Document {
let mut doc = Document::with_version("1.5");
let pages_id = doc.new_object_id();
let font_id = doc.add_object(dictionary! {
"Type" => "Font",
"Subtype" => "Type1",
"BaseFont" => "Courier",
});
let resources_id = doc.add_object(dictionary! {
"Font" => dictionary! {
"F1" => font_id,
},
});
let content = Content {
operations: vec![
Operation::new("BT", vec![]),
Operation::new("Tf", vec!["F1".into(), 48.into()]),
Operation::new("Td", vec![100.into(), 600.into()]),
Operation::new("Tj", vec![Object::string_literal("Hello World!")]),
Operation::new("ET", vec![]),
],
};
let content_id = doc.add_object(Stream::new(dictionary! {}, content.encode().unwrap()));
let page_id = doc.add_object(dictionary! {
"Type" => "Page",
"Parent" => pages_id,
"Contents" => content_id,
"Resources" => resources_id,
"MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()],
});
let pages = dictionary! {
"Type" => "Pages",
"Kids" => vec![page_id.into()],
"Count" => 1,
};
doc.objects.insert(pages_id, Object::Dictionary(pages));
let catalog_id = doc.add_object(dictionary! {
"Type" => "Catalog",
"Pages" => pages_id,
});
doc.trailer.set("Root", catalog_id);
doc
}
fn main() -> std::io::Result<()> {
// Generate a stack of Documents to merge.
let documents = vec![
generate_fake_document(),
generate_fake_document(),
generate_fake_document(),
generate_fake_document(),
];
// Define a starting `max_id` (will be used as start index for object_ids).
let mut max_id = 1;
let mut pagenum = 1;
// Collect all Documents Objects grouped by a map
let mut documents_pages = BTreeMap::new();
let mut documents_objects = BTreeMap::new();
let mut document = Document::with_version("1.5");
for mut doc in documents {
let mut first = false;
doc.renumber_objects_with(max_id);
max_id = doc.max_id + 1;
documents_pages.extend(
doc
.get_pages()
.into_iter()
.map(|(_, object_id)| {
if !first {
let bookmark = Bookmark::new(String::from(format!("Page_{}", pagenum)), [0.0, 0.0, 1.0], 0, object_id);
document.add_bookmark(bookmark, None);
first = true;
pagenum += 1;
}
(
object_id,
doc.get_object(object_id).unwrap().to_owned(),
)
})
.collect::>(),
);
documents_objects.extend(doc.objects);
}
// "Catalog" and "Pages" are mandatory.
let mut catalog_object: Option<(ObjectId, Object)> = None;
let mut pages_object: Option<(ObjectId, Object)> = None;
// Process all objects except "Page" type
for (object_id, object) in documents_objects.iter() {
// We have to ignore "Page" (as are processed later), "Outlines" and "Outline" objects.
// All other objects should be collected and inserted into the main Document.
match object.type_name().unwrap_or("") {
"Catalog" => {
// Collect a first "Catalog" object and use it for the future "Pages".
catalog_object = Some((
if let Some((id, _)) = catalog_object {
id
} else {
*object_id
},
object.clone(),
));
}
"Pages" => {
// Collect and update a first "Pages" object and use it for the future "Catalog"
// We have also to merge all dictionaries of the old and the new "Pages" object
if let Ok(dictionary) = object.as_dict() {
let mut dictionary = dictionary.clone();
if let Some((_, ref object)) = pages_object {
if let Ok(old_dictionary) = object.as_dict() {
dictionary.extend(old_dictionary);
}
}
pages_object = Some((
if let Some((id, _)) = pages_object {
id
} else {
*object_id
},
Object::Dictionary(dictionary),
));
}
}
"Page" => {} // Ignored, processed later and separately
"Outlines" => {} // Ignored, not supported yet
"Outline" => {} // Ignored, not supported yet
_ => {
document.objects.insert(*object_id, object.clone());
}
}
}
// If no "Pages" object found, abort.
if pages_object.is_none() {
println!("Pages root not found.");
return Ok(());
}
// Iterate over all "Page" objects and collect into the parent "Pages" created before
for (object_id, object) in documents_pages.iter() {
if let Ok(dictionary) = object.as_dict() {
let mut dictionary = dictionary.clone();
dictionary.set("Parent", pages_object.as_ref().unwrap().0);
document
.objects
.insert(*object_id, Object::Dictionary(dictionary));
}
}
// If no "Catalog" found, abort.
if catalog_object.is_none() {
println!("Catalog root not found.");
return Ok(());
}
let catalog_object = catalog_object.unwrap();
let pages_object = pages_object.unwrap();
// Build a new "Pages" with updated fields
if let Ok(dictionary) = pages_object.1.as_dict() {
let mut dictionary = dictionary.clone();
// Set new pages count
dictionary.set("Count", documents_pages.len() as u32);
// Set new "Kids" list (collected from documents pages) for "Pages"
dictionary.set(
"Kids",
documents_pages
.into_iter()
.map(|(object_id, _)| Object::Reference(object_id))
.collect::>(),
);
document
.objects
.insert(pages_object.0, Object::Dictionary(dictionary));
}
// Build a new "Catalog" with updated fields
if let Ok(dictionary) = catalog_object.1.as_dict() {
let mut dictionary = dictionary.clone();
dictionary.set("Pages", pages_object.0);
dictionary.remove(b"Outlines"); // Outlines not supported in merged PDFs
document
.objects
.insert(catalog_object.0, Object::Dictionary(dictionary));
}
document.trailer.set("Root", catalog_object.0);
// Update the max internal ID as wasn't updated before due to direct objects insertion
document.max_id = document.objects.len() as u32;
// Reorder all new Document objects
document.renumber_objects();
// Set any Bookmarks to the First child if they are not set to a page
document.adjust_zero_pages();
// Set all bookmarks to the PDF Object tree then set the Outlines to the Bookmark content map.
if let Some(n) = document.build_outline() {
if let Ok(x) = document.get_object_mut(catalog_object.0) {
if let Object::Dictionary(ref mut dict) = x {
dict.set("Outlines", Object::Reference(n));
}
}
}
document.compress();
// Save the merged PDF.
// Store file in current working directory.
// Note: Line is excluded when running doc tests
if false {
document.save("merged.pdf").unwrap();
}
Ok(())
}
```
* Modify PDF document
```rust
use lopdf::Document;
// For this example to work a parser feature needs to be enabled
#[cfg(not(feature = "async"))]
#[cfg(any(feature = "pom_parser", feature = "nom_parser"))]
{
let mut doc = Document::load("assets/example.pdf").unwrap();
doc.version = "1.4".to_string();
doc.replace_text(1, "Hello World!", "Modified text!");
// Store file in current working directory.
// Note: Line is excluded when running tests
if false {
doc.save("modified.pdf").unwrap();
}
}
#[cfg(feature = "async")]
#[cfg(any(feature = "pom_parser", feature = "nom_parser"))]
{
tokio::runtime::Builder::new_current_thread()
.build()
.expect("Failed to create runtime")
.block_on(async move {
let mut doc = Document::load("assets/example.pdf").await.unwrap();
doc.version = "1.4".to_string();
doc.replace_text(1, "Hello World!", "Modified text!");
// Store file in current working directory.
// Note: Line is excluded when running tests
if false {
doc.save("modified.pdf").unwrap();
}
});
}
```
## FAQ
* Why does the library keep everything in memory as high-level objects until finally serializing the entire document?
Normally, a PDF document won't be very large, ranging from tens of KB to hundreds of MB. Memory size is not a bottle neck for today's computer.
By keeping the whole document in memory, the stream length can be pre-calculated, no need to use a reference object for the Length entry.
The resulting PDF file is smaller for distribution and faster for PDF consumers to process.
Producing is a one-time effort, while consuming is many more.
lopdf-0.34.0/assets/AnnotationDemo.pdf 0000644 0000000 0000000 00032213204 00726746425 0015767 0 ustar 0000000 0000000 %PDF-1.7
%
1 0 obj
<>]/BaseState/ON/Creator(Horst Rutter)/Intent/Design/ListMode/AllPages/Locked[]/Name(OCConf)/OFF[]/Order[]/RBGroups[]>>]/D<>]/BaseState/ON/Creator(Horst Rutter)/Intent/Design/ListMode/AllPages/Locked[]/Name(OCConf)/OFF[]/Order[]/RBGroups[]>>/OCGs[]>>/OpenAction<>/S/JavaScript/Type/Action>>/Pages 2 0 R/Requirements[<>]/SpiderInfo 67 0 R/Threads 65 0 R/Type/Catalog/URI<>>>
endobj
9 0 obj
<>
stream
xl0C_%Yv߂q~u[Sm?%Jo]Rtj|MzEQ(`&ˮvtHyj;h)oEcNWV$_!;9~ Ql
endstream
endobj
7 0 obj
<>
stream
endstream
endobj
8 0 obj
<>
stream
endstream
endobj
4 0 obj
<>
stream
0 0 m 0 20.000000 l 20.000000 20.000000 l 20.000000 0 l s
endstream
endobj
5 0 obj
<>
stream
endstream
endobj
6 0 obj
<>
stream
endstream
endobj
28 0 obj
<>/Type/EmbeddedFile>>
stream
xi~s
JdH](Cfg2G!BȔ2%PyH9CPT**$S2Ed뽮cpG8<{
g}w+op6Xkgvm7ExůMk|7|埗^y埗^y埗^y埗^g-wryv㋱SƆD,s\xu</ysޜmyOޓ
xs3īURyu^yA^?yk+5
31OVbظF|5.cXėK}l:w;~'|4I831w-sd~27Mr4s/wr\+ʍr+c:ߥyi:xwjU^O'Džya]n;N[_˯yy^ޕwB%|RFilZq'l|*>r1[Wx>_t>/?ʼ2Ƽ1gUb:~]oX+Ec#W&,bX,˔_{q\gƙqz1gYwb&bbJ|%Nx!^7o^?~x)^8;ΎO'*<|n
xxxxxxxxxxxxxx8]NW2n_wwW}h.9{*_ϏϏOOg##__84>4:_ZvXߊoŗL;L828$CЩ1k[VS1uخk-mt]>>jĜ1gml!fŧ[&{^n|7sE"~?ŏʸ2k',.8>>kbYcGy<?<7%sɜ7o8mn./澹w]r3/s'ʃ<<2SO!bn[*JkgyhZm6|grM F
>gƂx}_Wm{x8Gx*gx<{uvlvQ\zU\ƭX<rZn
qC|3Yx_-3Z7֍}b)qJa
{xƘpYW1ָqm!ᠼ`Ov=9Ok=oX=o/>\rBWsbx
Wq%F+ap*6)\,6Y073/Kϻ]u})?+|tF6̡iaֱulƧՎam CE3L߾z^\gYLǻ9cΘo!ߕʹr;.NS|Y L9w'ؤhF~
W|*ez/Ň77O\|9.+ ۊI[eO=OVljۏGŭbNxckXǖ4^i|r@jx⦅cbⷙbח;}.kg+;29&?8!o(_K/y@03iP~k4CE-æ28FO/kyxxxxxxxxx/_Uzk9s\4;ss;MnS8Kkaa8`[X
p, 1v2|&4ܥhY|xwQgfffff*:0݀o¸14܇8*8]hkqI_kslk8ERa+ݳݹĩ8l?l?5555??;;|qٰ00@
i_Wp\j;j/!w+>9ޓ'ꭻg{\i?KT.K{ύϕQ0[Ζ+
NS&6!"'`8|}>,V]Gy&5C?x7]4}DUbfR3~smqpƁ!r'Gθ4ou=]ĩqjiMAa{IB[,[|k㵅ol'O}<qs|bsq?aUF
dF|y33WnoooZ7盋[t\0rܣxܱp-Y^VxEAt,n'Σ]Dma{~WOm[^jst_|\t]M;MZoa/k|<Ω¥`ɱPW=nصbXbVutp*f
Έ3`:ƹv8s8aھ 3/T]kat*C|o`XƍOII^FߗΥ+>h1qX)W~
',\~'l}l.SbqgYpkZEe@I5;r'G4>
4.8.Z|t7ߊK~hWb/˷K_/TA߁Sk|>J40Mq<ǽ{5ڹv~8?T-\.W6gg6+ܳ8~GѲ!LEx+i34ýra eea9sTjZ.=}+IJ6}bfiy@ =Ii||UbC?o7qs\}*MΓC|,_fF5f-}cίQk\@\ppLkpF<t>/yŭ{90,͆Kq5qM!y:a+pr@w8:Kw=|4=r/N+呸ar䖸%~/^Sc43iv0#>n6n6??n>n>~iRWbE=7|k59+e9k\%y?;:,bX 6w;ߜ<bHΟbɹ:.!yq^i~|ObM-hM[a/^ybWa:ڊGĠov|_/>+uԷb' N|ν7/S~VwXsC;)u|gt]:6q_]r^k Lim{l [G>@Ӷ{j_wgx"ąW+J;gkr,5|ODfa}FsBK!yHt)c+5
ߵ2KLpUn͛_ǿWWT_W-|C=oUէdI
ኸTg!Pϼ'/{qb_}'b=S/87%u;,u+.7x;1O,c[FT߂ZХp="L.S|]af.:~r'^z>>;;.F\z}Cn-x 54kUwg厈#*_9%
M"?SӞ5k7
oq{i6cľؔŧWUqGqC|u"vVcCzAF_ O}X \6~ڑ^C9}i'#^M?sj}sbIFp
VP;[^W-~XV`|SbaO?K~5^kVXB+~^|xN]ϯƥO`b?;lmxX\ʶ=t~O
V>{ROpYyVٔfihVu|Sϫ6. "4ݚnU6WU>V7Ʒ4F?W?͟Vx:H-H?%R5xq&ƹqiazt