Skip to main content
Commonmark migration
Source Link

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];stackoverflow;

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: https://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: https://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on stackoverflow;

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: http://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdfhttps://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: http://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: https://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf

Source Link

I had the same problem - Belgium's ING Bank now provides statements only as format pdf, with layout ± exactly as described in the post.

I tried 4 or 5 Open Source text extractors. The best was GhostScript - with thanks to this posting on [stackoverflow][1];

GhostScript is the only O.S. extractor that I have found that renders lines as on page. (pdftotext and friends tend to break lines half way along.)

Then a little Perl script parsed the extracted txt into csv without problems. The columns in that final csv are Date;Balance;AMOUNT;text field1;text field2; ...

Dates are easy to spot with a regex qr(\d\d-\d\d\20\d\d).

The line «DATE SUBJECT AMOUNT» is also easy to spot with a regex that matches «+99.999,00» or «-1,23» (european way of writing numbers) at end of line.

The weird multiline format is rendered into csv as

  • weird line 1 in column text field 1,

  • weird line 2 in column text field 2,

  • etc.

I dont use that information very much so have not tried to mend any extraneous line breaks that there may be in the original.

One useful tip - in developing the Perl, add an extra column of "my calculation of the balance" and check that it always equals what the bank statement gives as the balance. [1]: http://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf