You have to admit it; you started reading this blog and fully expected a new years greeting. But HAH; I won’t do that in a blog. Find me in real life and I’ll add a hug or handshake to match. You know you want one!
Ok, with that out of the way, I want to talk about something that I find pretty darn exciting. Honestly, I think that a lot with KDE4 apps, they all have such very smart ideas. Well, this one is a bit different. I blogged about page sizes some 8 months ago, in that blog I said that I finished a feature that allows you to have a different page size for each page. There was just one tiny little detail that I forgot (for various definitions of forgetting); you need to be able to actually print those pages for this feature to come to its fullest potential.
I already blogged about me adding a method to QPrinter set a custom page size for printing. And that works great; but after implementing this stuff in KWord I found that it was not enough. I got the funny result that the page sizes for all pages were equal to the last set page size. Close, but no sigar.
So, over the holdays I spent some time reading up on the PDF spec and figured it was a simple bug that I could fix with some effort. The bugfix is in 4.4 and KWord can now honestly create proper PDFs with the pagesizes as you expect them. Some testing also showed that portrait/landscape *just works*. So I’m confident that a lot of new users are going to be happy with these capabilities.
While reading the PDF spec I noted that we can use some extra pdf tags to do things like bleeding better. We already do bleeding and it and probably *just* works for the majority of the printshops, but software can always get better. I’ll reserve that for Qt4.5 though.
As talking about graphics kind of makes a screenshot mandatory; here you go:
For the printer or printshop owners; here is the PDF itself (its uncompressed for debugging purposes) The pdf (pagesizes).
5 Responses to “PDF pagesizes”
> here is the PDF itself (its uncompressed for debugging purposes)
LOL! everyone debugs something different - you debug PDFs! ![]()
Simply awesome. Having been in the software industry 20-plus years and having seen so many printing/page formatting SNAFUs in so many applications, both free and proprietary, I take my hat off to you. Excellent work, Thomas.
PDf printing is great. Why don’t we have a PDF viewing widget in QT?
Nice work! Just a curiosity question on orientation: is landscape “real” landscape (with the right entries in the dictionaries), or is it rotated portrait, or just a page which happens to have the dimensions of a landscape page? However, having done (too?) much PS/PDF processing, I’ll take my hat of too for what QT already can do.
@physicistjedi: do this on your own by subclassing QPaintEngine and QPrinter and directing the drawing operations via QPrinter::paintEngine() and QPaintEngine::paintDevice() to a QWidget, QImage or whatever.
lg
Erik
