Comment by spacebanana7
3 years ago
I've thought about this and come round to think that the flaws of PDF are actually essential to the success of the document format.
- Non-responsive (compared to HTML). Allows PDFs to serve as a common standard between other document formats with different resizing logic, like Latex and Word.
- Difficultly of network access from code running inside document. Allows PDFs to generally operate offline. Nobody's brave enough to try to write a single page application in a PDF
- Destroying data structure. Allows forward compatibility with anything that can be displayed statically on a screen. New applications can have different ideas about how tables, text or charts should work but if there's static visual output then it'll convert to PDF. Awareness of say, the structure of tables is precisely what makes it so difficult for say google sheets and excel to stay compatible with each other's new table features. If somebody develops a new language with new characters not even in Unicode it'll still work on a PDF
It's also worth noting that most PDF limitations have the characteristic of making things hard but not absolutely impossible. These escape hatches prevent people with hard requirements from actually moving to a new format.
If it were truly impossible to get invoice data from PDFs people might've shifted to a different format for business transactions. But if it's merely difficult some company will come up with an API that works as a good enough extraction solution whose cost is justified by the other compatibility benefits of PDFs, so the ecosystem stays with PDFs.
>Difficultly of network access from code running inside document. Allows PDFs to generally operate offline. Nobody's brave enough to try to write a single page application in a PDF.
You can absolutely do so. Most times however, the desire is to embed the latest cut of info into the PDF, then hand it off to somebody who will not have network access.
t. Been there, done that. Had the end product thrown out because of Adobe's licensing terms. I also met one of the people responsible for the tooling I had to suffer through. I have their address, but they apologized, and explained the internal politics at the time; so I've chilled on the whole crushing their genitalia with a large wrench bit.
Long story short: doable, but
Seriously. If I could fill this post with spikes and sick faces, I would.
XFA was the dream of madmen, and sadists, that decent men thought they could wrangle some positive utility out of. They were wrong.
The trefoil is not an angel. The weird ring things are symbols for infectious waste.
Oh but there is:
https://en.wikipedia.org/wiki/Apache_Flex
Not sure if I linked to the right article, but it was basically compiled scripts/code that was embedded into PDF's that could run arbitrary code.
""Apache Flex, formerly Adobe Flex, is a software development kit (SDK) for the development and deployment of cross-platform rich web applications based on the Adobe Flash platform.""