# Why Are All the Amounts Negative? The Invisible Minus Sign in PDFs

Original title: Why are all the amounts values negative?

> Hacker News story 49141521 · language: en · submitted 2026-08-02
> Web version: https://zeli.app/story/49141521
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 44 · by [4pkjai](<https://news.ycombinator.com/user?id=4pkjai>) · 💬 23
[original](<https://bankstatementconverter.com/blog/posts/2026-08-02-why-are-all-amounts-negative/>) · [HN discussion](<https://news.ycombinator.com/item?id=49141521>)

## Summary

A customer reported that all amounts in a converted bank statement were negative. Investigation revealed the PDF used trailing minus signs, but for positive values, the minus was rendered in the same gray as the background, making it invisible. This hidden character was still extracted by the converter. The post explains the PDF commands involved and offers two fixes: OCR the PDF or strip non-black text, with the latter requiring storing text color during extraction.

## Key quote

> The character is there, but it is not visible and that’s why it comes through when my code processes this PDF.

## HN discussion (23 comments)

### [rmunn](<https://news.ycombinator.com/item?id=49217889>)

> I was expecting something about double-entry accounting and how it can (initially) be non-intuitive whether to mark a given entry as a debit (-100) or credit (+100), especially for liabilities (when you enter a credit card payment in your ledger, the signs aren't what you might intuitively expect when you haven't wrapped your head around the system yet).
>
> Instead I get a nice blog post about a knotty little problem caused by someone's abuse of semantic markup for style purposes. Shows that HTML doesn't have a monopoly on that issue. PDFs are already bad enough as a format for extracting data from, we don't need dumb HTML-inspired tricks on top of that.
>
> Nice job finding the issue and explaining it clearly, OP. Thanks for an interesting writeup.

### [deepsun](<https://news.ycombinator.com/item?id=49217633>)

> Why not skipping all the minus signs unless they do not immediately precede a number. I see all the minus signs are after the number, not before, so just skip if they are not before. Preferably in the same BT/ET block as the number.

### [happymellon](<https://news.ycombinator.com/item?id=49158221>)

> Does this end on a cliffhanger?
>
> Did they try one method, and what was the feedback?

---

## Cite

- Page: https://zeli.app/story/49141521
- Date: 2026-08-02
- Source: bankstatementconverter.com (https://bankstatementconverter.com/blog/posts/2026-08-02-why-are-all-amounts-negative/)
- Hacker News: https://news.ycombinator.com/item?id=49141521

## Other languages

- zh: https://zeli.app/zh/story/49141521 · markdown: https://zeli.app/zh/story/49141521.md
- ja: https://zeli.app/ja/story/49141521 · markdown: https://zeli.app/ja/story/49141521.md
- ko: https://zeli.app/ko/story/49141521 · markdown: https://zeli.app/ko/story/49141521.md
- de: https://zeli.app/de/story/49141521 · markdown: https://zeli.app/de/story/49141521.md
- es: https://zeli.app/es/story/49141521 · markdown: https://zeli.app/es/story/49141521.md
