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

Removing Spaces For No Reason #361

Open
KarlGNassar opened this issue Sep 2, 2024 · 1 comment
Open

Removing Spaces For No Reason #361

KarlGNassar opened this issue Sep 2, 2024 · 1 comment

Comments

@KarlGNassar
Copy link

Is there a way to disable the removal of whitespaces?


When I use pdfjs-dist I get this:

    {
        "str": "Exchange income, net",
        "dir": "ltr",
        "width": 98.45999999999992,
        "height": 9,
        "transform": [9, 0, 0, 9, 85.03940000000011, 400.8149999999999],
        "fontName": "g_d0_f1",
        "hasEOL": false
    },
    {
        "str": " ",
        "dir": "ltr",
        "width": 25.51200000000001,
        "height": 0,
        "transform": [9, 0, 0, 9, 183.4994, 400.8149999999999],
        "fontName": "g_d0_f1",
        "hasEOL": false
    },
    {
        "str": "1,246,450",
        "dir": "ltr",
        "width": 40.56300000000019,
        "height": 9,
        "transform": [9, 0, 0, 9, 413.1074000000001, 400.8149999999999],
        "fontName": "g_d0_f3",
        "hasEOL": false
    },

As you can see, there is a space between the first and last text


But when I use pdf2json I get this:

    {
        "x": 5.065,
        "y": 23.805,
        "w": 11,
        "oc": "#1f12ff",
        "sw": 0.33853125,
        "A": "left",
        "R": [{ "T": "Exchange income, net", "S": 3, "TS": [0, 12, 0, 0] }]
    },
    {
        "x": 25.569,
        "y": 23.805,
        "w": 4.532,
        "oc": "#1f12ff",
        "sw": 0.3125,
        "A": "left",
        "R": [{ "T": "1,246,450", "S": 3, "TS": [0, 12, 0, 0] }]
    },

Any configuration that I'm missing?

@KarlGNassar
Copy link
Author

image
Columns are so far from each other, and a space in a CSV really matters.

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