Bug 451409 - Import fails on some valid ticket train (Nomad, Normandie train in France)
Summary: Import fails on some valid ticket train (Nomad, Normandie train in France)
Status: RESOLVED FIXED
Alias: None
Product: KDE Itinerary
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Android Android 10.x
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-11 20:31 UTC by Vincent-Xavier JUMEL
Modified: 2022-09-12 16:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 22.08.2
Sentry Crash Report:


Attachments
ticket.pdf (616.75 KB, application/pdf)
2022-03-11 20:31 UTC, Vincent-Xavier JUMEL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent-Xavier JUMEL 2022-03-11 20:31:53 UTC
Created attachment 147449 [details]
ticket.pdf

Import fails on some valid ticket train (Nomad, Normandie train in France)


STEPS TO REPRODUCE
1. Add the attached file to Itinerary Android App

OBSERVED RESULT
Nothing imported

EXPECTED RESULT
Train ticket in the wallet

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Volker Krause 2022-03-12 10:46:17 UTC
Thanks for the sample document! The PDF structure is very similar to other SNCF samples, but the barcode is using a format we haven't seen before at all yet. It's binary, unlike most other SNCF barcodes which contain at least some textual information. So unless we find documentation for that format we'd need a lot more samples to have a chance on decoding this I'm afraid.

The more promising approach might therefore be to see if we can make extraction work just from the PDF content and ignore the barcode for now.
Comment 2 Volker Krause 2022-09-12 16:02:16 UTC
Git commit 1bbd484a509bde42a0ebee323666b8f234ebf63c by Volker Krause.
Committed on 12/09/2022 at 15:52.
Pushed by vkrause into branch 'release/22.08'.

Support SNCF regional tickets from Normandie

Some of those use a so far unknown binary barcode format we cannot decode
yet. The PDF layout however is very close to the "Secutix v2" layout, so
we can get decent results by reusing most of the extractor script for that.
FIXED-IN: 22.08.2

M  +26   -3    src/lib/scripts/sncf.js
M  +12   -0    src/lib/scripts/sncf.json

https://invent.kde.org/pim/kitinerary/commit/1bbd484a509bde42a0ebee323666b8f234ebf63c