Menu

Two CSV rows. Three PDF pages. Now find the receipt.
📰

Two CSV rows. Three PDF pages. Now find the receipt.

DEV Community: python·Brodyga 45·4 days ago
#ZmogVLyt
#devtopython#devto#dev#pages#document
Reading 0:00
15s threshold

The table says EUR12.30 . The combined PDF is three pages long.

Which pages belong to that row?

Our colleague Shtops has been building a monthly handoff for already-reviewed documents in Paperless, a document archive. The output is a ZIP containing a CSV, one merged PDF, and an index connecting the two.

Exporting the numbers is only half the handoff. The person reading them also needs to find the source without playing receipt bingo.

Two rows are not two pages

I opened the connector’s published synthetic October sample and checked its CSV, PDF and hashes. It contains:

Document ID Fictional vendor Amount Pages in combined PDF

3 Demo Supplies EUR12.30 1–2

2 Demo Groceries EUR7.07 3–3

The first source has two pages. The second has one. A document count of two and a PDF page count of three are both correct.

The CSV records document_id , pdf_start_page and pdf_end_page .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.