Mike Marchywka <marchywka <at> hotmail.com> writes: > The text is fixed or unrelated (no?)
No. Not Even Close. You're not even on the right PLANET, much less the right ballpark. PDF (and SVG: your ignorance and ass-u-mptions are showing again) maintain a number of "current" attributes: *Transformation Matrix *Color (fill & stroke colors are separate) *color /space/ *Location *line width (that's all I can think of off the top of my head that might affect text as well as vector art, but I'm probably missing a few things, the stuff after this is what I thought of as I was writing the rest of this message.) *Transparency *CLIPPING REGION *Graphic state stack depth! So if a line is drawn from A to B, the Location has changes. This affects the way all the text/images/vector art will be displayed that follow. Yank a line out of a PDF content stream and all the text that follows it MIGHT move. Because you can push and pop the graphic state, its quite possible to isolate various graphic elements such that they do not affect one another at all. But there's nothing forcing you to do so, and the output is a bit more efficient if you /don't/. PDF is all but write-only. It doesn't do any hand holding. Just opening a PDF up and finding how many pages it contains is No Small Task. There's a programming analogy that seems to fit: Basic is like a suction cup dart gun. C++ is like a shotgun that by default is pointed at your head. Which one do you want when you're learning? Which one do you want when you go bear hunting? HTML and PDF are two very different beasts, with very different (original) purposes. Things that are trivial in one are impossible (or nearly so) in the other. Lots of things have been added to both to broaden their appeal, with varying degrees of success. Take PDF Structure. Properly implemented, structure can do All Kinds of Spiffy Things. Only Adobe properly implements it (that I've ever seen), and even they mess it up. Check the MCIDs & parent tree for the second page of a Real Form from Lifecycle Designer 8, HA! Educational though. To really live up to its promise, structure needs to be more wide spread than it is. "Nobody" supports it so "nobody" tries to implement it, so "nobody" supports it... It has thus far failed to reach techno-critical-mass. It may never. Such is life. PDF puts appearance (and the consistency of that appearance) first. HTML puts meaning first. PDF has done various things to try to add meaning. HTML has done various things to improve its appearance (and I suspect you have Intimate Knowledge of just how consistent that appearance can be across different versions of different browsers). The order in which things are described in an HTML file is Very Important. It defines the READING (logical) ORDER. Adding Z information to HTML requires that you add an attribute to your elements. Not that hard. The order in which things are described in a PDF file is Very Important. It defines the Z (appearance) ORDER. Adding structure (meaning, reading order etc) to stuff in PDF is HARD. Believe me. Text in HTML is TEXT: A collection of characters. "Text" in PDF can be a collection of characters, or a pile of nigh-random GLYPH IDs from a font with its glyph->character map stripped out, or a bunch of vector art that happens to look like letters. And you can't tell which until you peel the PDF open and start rooting around in it. (and both can put that text in a raster image or Embedded Thing) A table in HTML is a <table>TABLE</table>. A "table" in PDF is where stuff happens to be drawn. Many of your attacks on PDF (lol!) seem to boil down to "It's not HTML". Gosh really? Thanks for clearing that up. They're different tools. Use the right tool for the job. And stop trying to hang sheet rock with a voltage meter. I mean, can you imagine how you look to someone who knows how to pick up a nail gun? Yep. --Mark Storer ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
