22 ms·
I've come up with an idea of PDDF (Portable Data Document Format). The PDF format allows embedding files into documents. Why not embed an SQLite database file r
by dgudkov 6y ago
I've come up with an idea of PDDF (Portable Data Document Format). The PDF format allows embedding files into documents. Why not embed an SQLite database file right in PDF document with all the information nicely structured? The both formats are very well documented and there are lots of tools on any platform to deal with them. Humans see the visual part of PDF, while machine processing works with the SQLite part.
Imagine that instead of parsing a PDF invoice, you just extract the SQLite file embedded in it, and it has a nice schema with invoice headers, details, customer details, etc.
Anything else in PDF would work nicely either - vector graphics, long texts, forms - all can be embedded as an SQLite file in a PDF.
- hdjdbtbgwjsn 6y agoHow do you validate that the machine readable sqlite db has the same content as the human readable?
- throwaway_pdp09 6y agoYou can't presumably, you have to take it on trust. It's a neat idea. Getting structure from text dumps of PDFs is no fun.
- oblio 6y agoIt seems the PDF standard is ahead of you: https://news.ycombinator.com/item?id=24467959 https://news.ycombinator.com/item?id=24467959 :-)
- mkesper 6y agoLibreoffice can export hybrid PDFs containing the whole libreoffice document inside the PDF.
- rasz 6y agoHaven't you heard Mozilla foundation? You cant just embed SQLite database!!!1 Its all about those developer aesthetics! https://hacks.mozilla.org/2010/06/beyond-html5-database-apis-and-the-road-to-indexeddb/ https://hacks.mozilla.org/2010/06/beyond-html5-database-apis...
- afiori 6y agoI think that PDFs and developers aesthetics live on different planets... (As a side note Mozilla reasoning is that no one knows how to turn SQLite into a backward compatible standard, not even SQLite developers. So while they recognise how WebSQL is a fantastic feature it is inadequate for the web platform the same way it would be to add a python interpreter to the browser)