Having a little fun with poppler, PyQt and rst2pdf
Inspired by a post by André Roberge I wanted to see if rst2pdf was too slow to be used for real-time previews in a restructured text editor.
It would also be very useful, for example, as a way to test stylesheet changes, making rst2pdf much more useful in general.
And after a couple of hours of gentle hacking, you know... it doesn't suck at all. I implemented the (still very primitive) PDF viewer using a python/poppler/Qt binding I found via google, the UI is PyQt.
Here's the video:
A note: the video was recorded using qt-recordmydesktop and that program is awesome. It was trivial to do.
I expect this will not be good enough when long documents are processed, but the rst2pdf manual (about 25 pages) renders in 5 seconds.
This is impressive! I loved how easy it was to switch to 2-column.
How well does rst2pdf handle non-ascii text?
It's all supposed to be unicode all the way.
There have been some unicode problems with reportlab but I think they al have been worked around.
That was a fun demo. Thanks for posting it.
Excelente demo! pero... que paso con el alineado a la izquierda que no anduvo?
@jjconti:
Como ese era el unico titulo en el documento, era un "title". El estilo title define esto:
["title" , {
"parent": "heading",
"fontName": "stdBold",
"fontSize": "200%",
"alignment": "TA_CENTER",
"keepWithNext": false,
"spaceAfter": 10
}],
Por lo que si toco "heading", estas cosas no cambian.
Is it possible to put the code somewhere public?
Not yet, because I am using a piece of code for which I don't know the license.
As soon as that's cleared, I'll put it somewhere.
Please tell the location of code..
The interesting part about PDF viewing is here: http://code.google.com/p/rs...