Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing char in unicode map panic #107

Open
0xricksanchez opened this issue Jan 12, 2025 · 0 comments · May be fixed by #109
Open

Missing char in unicode map panic #107

0xricksanchez opened this issue Jan 12, 2025 · 0 comments · May be fixed by #109

Comments

@0xricksanchez
Copy link

0xricksanchez commented Jan 12, 2025

Stack trace

missing char 60 in unicode map {63: "⋆"} for <</Type /Font/Subtype /Type1/ToUnicode 467 0 R/Widths 468 0 R/FirstChar 58/LastChar 63/BaseFont /KGEYJA+CMMI10/FontDescriptor 485 0 R>>

thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:794:75:
missing unicode map and encoding
stack backtrace:
   0: rust_begin_unwind
             at /rustc/ad211ced81509462cdfe4c29ed10f97279a0acae/library/std/src/panicking.rs:692:5
   1: core::panicking::panic_fmt
             at /rustc/ad211ced81509462cdfe4c29ed10f97279a0acae/library/core/src/panicking.rs:75:14
   2: core::panicking::panic_display
             at /rustc/ad211ced81509462cdfe4c29ed10f97279a0acae/library/core/src/panicking.rs:261:5
   3: core::option::expect_failed
             at /rustc/ad211ced81509462cdfe4c29ed10f97279a0acae/library/core/src/option.rs:2024:5
   4: core::option::Option<T>::expect
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:933:21
   5: <pdf_extract::PdfSimpleFont as pdf_extract::PdfFont>::decode_char
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:794:36
   6: <dyn pdf_extract::PdfFont>::decode::{{closure}}
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:758:54
   7: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:305:13
   8: core::option::Option<T>::map
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:1119:29
   9: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:107:26
  10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:25:32
  11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:34:9
  12: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3427:9
  13: core::iter::traits::iterator::Iterator::collect
             at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1971:9
  14: <dyn pdf_extract::PdfFont>::decode
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:758:23
  15: pdf_extract::show_text
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:1223:19
  16: pdf_extract::Processor::process_stream
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:1602:41
  17: pdf_extract::output_doc_inner
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:2353:5
  18: pdf_extract::output_doc
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:2324:9
  19: pdf_extract::extract_text
             at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pdf-extract-0.8.0/src/lib.rs:2165:9
[...]


@0xricksanchez 0xricksanchez linked a pull request Jan 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant