Skip to content

Inconsistency between camelot CLI/docs and API default line_scale #657

@Jels02

Description

@Jels02

Describe the bug

In the docs and CLI, the default line_scale is 40.
In the API, when omitting a line_scale, it defaults to 15.

Steps to reproduce the bug

python -m pip install camelot-py

camelot --output out.csv lattice document.pdf

output (table count)
differs to

import camelot
camelot.read_pdf("document.pdf")

depending on pdf lines

Expected behavior
Output should be consistent. This is made more confusing, as the CLI:

default=40,

uses the default listed in the docs:
line_scale* : int, optional (default: 40)

but not the actual implementation:
line_scale : int, optional (default: 15)

PDF

I can't provide a concrete example as the pdf I'm testing is sensitive.

Environment

  • OS: macOS 15.6.1
  • Python version: 3.13.5
  • Numpy version: 2.2.6
  • OpenCV version: 4.12.0.88
  • Ghostscript version: N/A
  • camelot version: 1.0.9

Additional context

I'm new to this project, so not sure which way the default is intended to be, otherwise I would open a PR to fix the incorrect default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions