4 ms·
You're just pushing complexity around. Now you have to figure out how much content you can put on each page before you have to make a new one. The reason it s
by recursive 4y ago
You're just pushing complexity around. Now you have to figure out how much content you can put on each page before you have to make a new one. The reason it seemed so easy is that you just deferred the hard part.
- lazyeye 4y agoNope. What you call the "hard part" is if (rowcount > 100) newpage(); But lets use an entirely new, esoteric PDF specific layout language instead and we wont call that the "hard part". Actually to be fair it obviously depends on the situation. If you are churning out large volumes of PDFs then it might make sense to get the efficiency with a PDF-specific language. But HTML -> PDF definitely has its place too and is not as hard to work with as people are claiming.
- recursive 4y agoYou did it again. What's a row? Are you telling me that 100 of them will fit on any page, regardless of font size or margins?
- lazyeye 4y agoWhy would you be randomly changing the font-size or margin? Surely that would be known in advance?
- recursive 4y agoSometimes they might be. But even if you know the font size of the headers, the contents, and the bulleted lists, you still won't know where the paragraphs wrap, unless you also require a fixed-width font, and don't allow any of the word lengths to change. But then we probably wouldn't be calling it a "modern library for PDF generation".