14 ms·
Portable Web Documents – An Alternative to PDF Based on HTML5 (2019)
- shswkna 3y agoPDFs are doing a pretty good job of bridging the gap between the real world (paper formats) and the digital world. The whole point is that they are not dynamic.
- Gabrys1 3y agoAfter skim reading this, can we just stick to PDF please? :-)
- Quarondeau 3y agoIn English even its name may work against its adoption, because of the W. Can you send me that as a "Pee-Double-You-Dee"?
- billpg 3y agoHTML can already have CSS and JS embedded with little ceremony. You can sorta embed images with data URLs, but I kinda wish you could instead add blocks of base64 encoding to the end of the HTML and reference it with a special IMG attribute. With that, if browsers could auto-detect GZIP-compressed-HTML and un-gzip silently, we'd have the ideal self-contained document.
- gildas 3y agoHere is an example of my ideal self-contained document format [1]. It's a self-extracting ZIP which can also be read as a PNG image. [1] https://gildas-lormeau.github.io/ https://gildas-lormeau.github.io/
- djbusby 3y agoSeems closely related to the topic of browser printing that was up earlier. My kingdom for an open standard (HTML) that can also be print-perfect (PDF) with good document header/footer/footnote and page numbers
- SigmundA 3y agoPDF is an open standard and if browser makers would get with it and support full CSS page media level 3 then you could render HTML to PDF with headers/footer/page numbers etc just like PrinceXML does.
- djbusby 3y agoI should have said "sorta human readable and easy to create" for HTML. I've been waiting on browser vendors for what feels like ages for good print-pages (since at least 2005). And +1 for PrinceXML (https://www.princexml.com/ https://www.princexml.com/) but i need tools that work with my MIT and GPL released code.
- crabmusket 3y agoA hill I hope one day to die on: almost every PDF I've interacted with in my adult life should have been a self-contained HTML page or file. All the benefits of PDFs are irrelevant to me as someone who isn't a book or magazine publisher.
- agumonkey 3y agoIsn't there a pdfml format where you convert the pdf stack/tree, expose transforms and expand all non text stream into readable utf8 ?
- ra1231963 3y agoPdfml is a great name because everytime I work with pdfs, I think fml
- LesZedCB 3y agobut wasn't that the point of pdf? we consumers of PDFs are the downstream users, not the target demographic. PDF solved a problem for publishers and magazines, not for consumers needing to read properly typeset digital documents. we just got the bread crumbs and then they became standard epub I believe are essentially what we as programmers would come up with, xml, html, and style sheets disclaimer: this is only partially informed speculation
- lxgr 3y agoePub indeed sounds like the standards-based answer here, but there are simply no great readers for it that I know of that don’t insist on somehow making every opened doc part of some library, assuming it must clearly be a book.
- pasc1878 3y agoFirefox addin for ePub Part of calibre can be used as just a reader (it might not be packaged easily for the user but can be done from the command line) Adobe Digital Editions (this does also have a library and does try to make you add it when you stop reading) I suspect Fbreader might be OK - its earlier versions were but I have stopped using it after it added things. Plus the basic unzip the file and just look at the files with a web browser. These are just ones I have on my machine now.
- mappu 3y agoAny comparison to epub? That's the modern pdf-ish alternative to mhtml,
- omeid2 3y agoMHTML? https://en.wikipedia.org/wiki/MHTML https://en.wikipedia.org/wiki/MHTML
- snshn 3y agoIs it somewhat like SingleFile?
- kwhitefoot 3y agoAnd WebScrapbook https://github.com/danny0838/webscrapbook https://github.com/danny0838/webscrapbook. I use WebScrapbook instead of SingleFile because it can save the component parts (fonts, images) separately so I can save space by hard linking identical files.
- livrem 3y agoI used Scrapbook for years. A nice thing is that even if I stopped using it I still have all the files I saved. There was some kind of export-function to save the tree of documents to an external index.html and I just keep that with all the other files in my hoard and can navigate all my old saved pages. I switched to SinglePage since I prefer to just save pages as stand-alone files. It does waste some space, but I can move the saved files to wherever it makes sense in my hoard and use my filesystem for organizing files instead of HTML documents living in their own location. I also use the Save Text to File add-on. Often only the text on a page is useful anyway. At least that compensates a bit for the space wasted when using SinglePage on other pages.
- kwhitefoot 3y agoThanks for mentioning the Save Text to File. I think I'll find that quite handy too!
- doubloon 3y agoReminds me of OpenDoc
- deleted 3y ago[deleted]
- acutesoftware 3y ago> "You can't just take the CSS stylesheets and references and store them." Yes you can - just save them locally?
- Spivak 3y ago"You can't capture the CSS that actually makes the page look correct only via the static stylesheets because many of the styles on the page are added dynamically by javascript."
- austin-cheney 3y agoMaybe it’s just not covered by the article but I see no mention of certificate based digital signatures. Without that this is dead on arrival in a real world business context. That is the primary reason many organizations remain stuck on PDF and why DocuSign is a viable business.
- 38 3y ago> no mention of certificate based digital signatures. Without that this is dead on arrival in a real world business context no, its really not. I have been using PDFs in a "real world business context" for many, many years. and out of thousands of PDFs sent and received, less than 1% (probably 0.1%) had a use for a digital signature. signatures are useful, but you seem to be inflating their importance for typical daily business use.
- lxgr 3y agoAre digitally signed PDFs actually common in your industry? All DocuSign contracts I’ve ever interacted with were signed using the “click here to sign your name” flow, i.e. not making use of PDF signatures at all. I’ve signed PDFs using a “qualified digital signature” myself a few times, but that was in the EU.
- austin-cheney 3y agoYes, digitally signing PDFs is regular business in my industry.
- doubloon 3y ago"They only support static layouts - not fluid/dynamic layouts that change when you resize the page. Don't have support for features like video, animated images, interactive charts." these things are features in a lot of contexts.
- Sakos 3y agoAbsolutely. Most books I read would be significantly worse to read without that static layout, pretty much every paper, every programming book, every science book, etc. I want books that are explicitly designed by somebody who gives a crap for a certain page size, not some automatic algorithm that gives me something that maybe fits the screen but loses all the context around the few lines I'm reading. I can't remember a single non-fiction epub that was better than or even equal to the PDF.
- agumonkey 3y agoI just fetched the PDF version of a book after being annoyed by the random reflow of the epub. Even though I appreciate epub logic and size...
- helboi4 3y agoyep i agree. unless the book is a stream of text that doesn't require layout factors it is better with a pdf. I'd rather manually move around the page. If the book is just a stream of text type of book then epub is of course better but that's not all books.
- pythonaut_16 3y agoIn my experience it comes down to the type of book. Novels and narratives with just a few supporting tables, illustrations, or diagrams? EPUB is probably preferable. But anything remotely technical with code snippets, diagrams, screenshots, tables, etc, PDF is going to be infinitely better.
- 38 3y agoagreed. its a shame how many websites are ruined by over use of CSS and JavaScript.
- parsimo2010 3y agoThis was posted in 2019. The website still says you should sign up for “early access.” I don’t think I’m jumping to use this document format if their main product has been in early access (which I read as “public beta”) for over four years without a full qualified release.
- xpressvideoz 3y agoTheir Android app and iOS app were also removed from the store, it seems.
- wolverine876 3y agoEPUB is already XHTML and supporting files zipped (iirc the packaging) into one file. It's very widely supported. I wonder why they don't start with it or even mention it? EPUB lacks annotation, which is not at all trivial; I don't know how well it handles precise layout and pagination, and long-term preservation (will I be able to read it in 20 or 50 or 100 years?). But, again, I wonder why they don't improve on EPUB or at least use it as a starting point, and not seem to reinvent the wheel? (Sometimes, there's a good reason.)
- amadeuspagel 3y agoEpub isn't that great. The very idea of having a bunch of files zipped is something that makes sense only for a device where the entire thing wouldn't fit into RAM otherwise, and that otherwise just adds senseless complexity.
- wolverine876 3y ago> The very idea of having a bunch of files zipped is something that makes sense only for a device where the entire thing wouldn't fit into RAM otherwise, and that otherwise just adds senseless complexity. Microsoft uses that, of course. Why is it senseless? It seems much easier to work with. The portability of one file, instead of directories, is great.
- amadeuspagel 3y agoThat's not what I mean. It should just be one file, one HTML file, with styles in a style tag, images as base64.
- jasonm23 3y agoWhy?
- lxgr 3y agoePub can do most of these things I believe; there are just not many “PDF-like” viewers for it, given that most existing ePubs are books. Features I need are being able to quickly open multiple documents side-by-side; a feature I actively don’t want is maintaining some sort of “library” for me.
- autoexec 3y agoThey want to keep all the complexity and bullshit that made PDF files a security nightmare plus add a bunch of new ones. They want iframes, video, audio, javascript, service workers, even WASM support! Documents are best when they're just documents and can't instantly infect your device just by opening them. The odds of this format being any less toxic than PDF is zero. It'd be pretty nice if we could have a document format that printed well, but didn't also allow for RCE attacks, violate your privacy, or require a locked down environment and ad blockers just to view safely.
- felixfbecker 3y agoAdobe Acrobat is what made PDF a security nightmare. The browser sandbox is by far the most secure execution environment we have.
- geraldhh 3y agoeven security focused products like foxit's are probably best known for their vulnerabilities
- autoexec 3y agoI can't remember the last time a year passed without at least one sandbox escape discovered in chrome. There was one less than two months ago, and perhaps there's already been another patched after the start of this year (https://www.securityweek.com/google-patches-six-vulnerabilities-with-first-chrome-update-of-2024/ https://www.securityweek.com/google-patches-six-vulnerabilit...). It'd be much better to support a sane subset of features than to allow a document to do everything and anything leaving you to just hope that the sandbox holds up to protect the rest of your system against the inevitable vulnerabilities.
- mcdonje 3y agoI was just thinking about this. They're going for gold, but I think there's an easy solution that incrementally improves on the current situation without all the effort. Right now you can download a webpage on most web browsers. It saves the html file and an associated folder. It would be cool if the web browsers placed that file and associated folder into a zip folder with a special file extension, and then the browser could read it on a double click as if you opened the html file. Yes, I know it's limited. But dead simple. The format could evolve and get more bells and whistles over time. Others mentioned epub. I do wish more sites offered epub downloads alongside or instead of pdf. Maybe browsers can do this, and maybe it'd be better than the simpler solution I suggested, but there are pros and cons to weigh here.
- __jonas 3y agoYou can already do this by just inlining all the assets into a single HTML file. This browser addon does that for example: https://addons.mozilla.org/en-US/firefox/addon/single-file/ https://addons.mozilla.org/en-US/firefox/addon/single-file/ The only downside I can see to what you propose is the file size overhead of base64 encoding the assets.
- gildas 3y agoYou can save pages a self-extracting pages to produce compact pages, see [1]. [1] https://gildas-lormeau.github.io/singlefile-updates/version-1-22.html#:~:text=What%20Are%20Self%2DExtracting%20ZIP,to%20be%20enabled%20for%20viewing https://gildas-lormeau.github.io/singlefile-updates/version-....
- __jonas 3y agoOh that's a great feature! Fantastic extension by the way, thank you very much for your work.
- djbusby 3y agoLike the MHT files from help system on Windows (back in the day)?
- ChrisArchitect 3y ago(2019)
- dang 3y agoAdded. Thanks!
- countWSS 3y agoMathJax+chart plotter lib+table sorter lib and embedding images as base64 would make PDFs obsolete. Unfortunately there is no agreed for standard embedding(all use different inline js/fonts) and rendering on browsers differs so people use PDFs as standard format. PDFs are huge in size vs HTML. they often require using dedicated viewers outside of browsers and the format is quite dated.
- tangmonk 3y ago[dead]
- bhavikchavda 3y agoNote to owner of getpolarized.io - Email OTP is not coming while clicking on Get Early Access.
- eviks 3y agoWould be great to have an alternative to PDF, but this spends too much time on saving web pages that weren't meant to be portable (and can't be faithfully saved as PDF ) vs doing detailed format description/comparison and generation/editing
- geor9e 3y agoI read the article, but I still don't understand the purpose of this. If you want to save an HTML page as a single file, you can choose the .mht format by clicking "save as single file" in your browser.
- eterps 3y agohttps://github.com/remy/inliner https://github.com/remy/inliner does most of this.
- msie 3y agoIve downloaded hundreds of epubs and pdfs and pdfs always win out in terms of appearance/formatting. Having a reflowable doc means appealing to the lowest common denominator.