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

Invalid cross-reference table (could not parse xref) #214

Open
ghost opened this issue Jan 4, 2023 · 3 comments
Open

Invalid cross-reference table (could not parse xref) #214

ghost opened this issue Jan 4, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 4, 2023

fn shrink_file(path: &str) {
  let doc = Document::load(path);
  match doc {
    Ok(mut pdf) => {
      pdf.compress();
      pdf.save(format!("{path}__compressed")).unwrap();
    },
    Err(error) => {
      panic!("error {}", error.to_string())
    }
  };
  
}

Output

thread 'main' panicked at 'error Invalid cross-reference table (could not parse xref)', src/main.rs:36:7
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ELIFECYCLE  Command failed.
 ELIFECYCLE  Command failed with exit code 101.
@ghost
Copy link
Author

ghost commented Jan 4, 2023

What's the problem?

@fold-squirrel
Copy link

can you provide the pdf you tried to open so that we can examine it.

@ghost
Copy link
Author

ghost commented Jan 15, 2023

can you provide the pdf you tried to open so that we can examine it.

The file is gone :(

Maybe problem was that I created it in Figma... idk

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

No branches or pull requests

1 participant