Skip to main content

Ralsina.Me — Roberto Alsina's website

rst2pdf 0.12 released!

It's my plea­sure to an­nounce the re­lease of rst2pdf ver­sion 0.12, avail­able at http://­code.­google.­com/p/rst2pdf/­down­load­s/list

Rst2pdf is a tool to gen­er­ate PDF files di­rect­ly from re­struc­tured text sources via re­port­lab.

Rst2pdf aims to sup­port the full re­struc­tured text fea­ture set, and is very close to that goal, while al­so in­clud­ing some of the more ex­per­i­men­tal fea­tures, like a source code di­rec­tive with syn­tax high­light­ing and math no­ta­tion sup­port with La­TeX-­like syn­tax.

It sup­ports em­bed­ding ar­bi­trary fonts, both True Type and PS Type 1, both raster and vec­tor im­ages (in­clud­ing SVG and PDF), page tran­si­tion ef­fect­s, mul­ti­ple, flex­i­ble page lay­out­s, cas­cad­ing styles, and much, much more.

This ver­sion in­cludes many bug­fix­es and MANY new fea­tures com­pared to the pre­vi­ous 0.11 ver­sion, in­clud­ing but not lim­it­ed to bet­ter styling, in­te­gra­tion with sphinx, a very raw, pre­lim­i­nar graph­i­cal fron­tend called bookrest, kern­ing sup­port (via wor­dax­e), and a much more pow­er­ful ta­ble im­ple­men­ta­tion.

In fac­t, this re­lease has so much new code it needs tester­s! I would con­sid­er it be­ta qual­i­ty, and may (prob­a­bly will) have some rough spot­s.

You can find more in­for­ma­tion about rst2pdf in its home page ( http://rst2pdf.­google­code.­com), and ask any­thing you want in the rst2pdf-dis­cuss mail­ing list (http://­group­s.­google.­com/­group/rst2pdf-dis­cuss)

A list of im­prove­ments and changes in this ver­sion is just too long, but is avail­able at the changel­og

I hope you en­joy this pro­gram!


In oth­er news, Google just found me two nice things re­lat­ed to rst2pdf:

  1. A tu­­to­ri­al to use sphinx and rst2pdf for ja­­pa­­nese texts: http://d.hate­­na.ne.jp/MiCHiLU/20091009/1255065687

  2. It looks like a rst2pdf 0.11 bi­­na­ry for win­­dows is shipped by pythonxy here: http://­­code.­­google.­­com/p/pythonxy/­­down­load­­s/de­­tail?­­name=rst2pdf-0.11_py26.exe I will link to that!

I love when peo­ple do things like these :-)

jjconti / 2009-10-10 13:25:

Seguí el link a la lista de correos a ver de qué se habla y de los 10 últimos mensajes, 9 son spam. Creo que el admin de cada lista en google group puede borrar el smap e incluso marcarlo como tal para prevenir futuros mensajes indeseados.

Por otro lado, felicitaciones por el release! Venía usando la versión del svn pero voy a usar esta para testearla.

Roberto Alsina / 2009-10-10 13:53:

Epa! resulta que yo no vi ese spam porque la sigo por mail y el spamassassin me los filtró :-D

Ahora los marco.

jjconti / 2009-10-11 21:42:

No puedo creerlo! Me pasó lo mismo en una lista que tengo yo :( Malditos spammers...

Emiliano / 2009-10-13 18:21:

Estaba usando la versión que está en los repos de ubuntu y si bien me tiraba errores y no andaba el style, me generaba el pdf. Desinstalé el paquete, me bajé esta nueva versión, hice:

setup.py build
setup.py install

y pruebo de generar el pdf del ejemplo (tu primer post) y me tira una serie de errores y no genera el pdf. Acá pego la salida.

$rst2pdf slides.txt -b1 -s slides.style
/usr/lib/python2.6/dist-packages/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen2
Cannot list directory /home/emiliano/.uniconvertor:[Errno 2] No such file or directory: '/home/emiliano/.uniconvertor'
ignoring it in font_path
Traceback (most recent call last):
File "/usr/local/bin/rst2pdf", line 8, in
load_entry_point('rst2pdf==0.12', 'console_scripts', 'rst2pdf')()
File "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.12-py2.6.egg/rst2pdf/createpdf.py", line 2414, in main
compressed=options.compressed)
File "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.12-py2.6.egg/rst2pdf/createpdf.py", line 1825, in createPdf
pdfdoc.multiBuild(elements)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 855, in multiBuild
self.build(tempStory, filename, canvasmaker)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 777, in build
self.handle_flowable(flowables)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 701, in handle_flowable
self.handle_frameEnd()
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 519, in handle_frameEnd
self.handle_pageEnd()
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 469, in handle_pageEnd
self.pageTemplate.afterDrawPage(self.canv, self)
File "/usr/local/lib/python2.6/dist-packages/rst2pdf-0.12-py2.6.egg/rst2pdf/createpdf.py", line 2132, in afterDrawPage
container.drawOn(canv, hx, self.hy)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py", line 742, in drawOn
w, h = c.wrapOn(canv,aW,0xfffffff)
AttributeError: 'unicode' object has no attribute 'wrapOn'

Saludos

Roberto Alsina / 2009-10-13 19:45:

@emiliano: version de reportlab?

Emiliano / 2009-10-13 20:21:

Gracias por la mano.
Tengo la última versión, la que instala ubuntu 9.04, es la 2.3-0ubuntu1, de lo que veo de la página oficial de reportlab es la última, la 2.3.

Roberto Alsina / 2009-10-13 20:55:

Ok, lo del .uniconvertor es cuestion de crearlo nomas (asi no ves mas ese warning).

Lo otro... no sé que puede ser, lo voy a tratar de ver dentro de un rato.

Roberto Alsina / 2009-10-13 20:55:

Ok, lo del .uniconvertor es cuestion de crearlo nomas (asi no ves mas ese warning).

Lo otro... no sé que puede ser, lo voy a tratar de ver dentro de un rato.

Roberto Alsina / 2009-10-14 19:44:

Ok, creo que encontre el error ese de wrapOn. Esta arreglado en SVN en la revision 1196

Roberto Alsina / 2009-10-14 19:44:

Ok, creo que encontre el error ese de wrapOn. Esta arreglado en SVN en la revision 1196

Emiliano / 2009-10-16 02:21:

Excelente, me bajé la última versión del svn (rev. 1214) y ahora anda bárbaro!
Me tira un warning [1] pero genera perfectamente el pdf usando el style.
Lamentablemente hoy tenía que usar la presentación y no tuve tiempo de pasarla. Pero lo sigo de cerca para la próxima, me parece muy ágil y flexible.

Excelente laburo y muchas gracias por la ayuda!

[1] /usr/lib/python2.6/dist-packages/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen2

Emiliano / 2009-10-16 02:21:

Excelente, me bajé la última versión del svn (rev. 1214) y ahora anda bárbaro!
Me tira un warning [1] pero genera perfectamente el pdf usando el style.
Lamentablemente hoy tenía que usar la presentación y no tuve tiempo de pasarla. Pero lo sigo de cerca para la próxima, me parece muy ágil y flexible.

Excelente laburo y muchas gracias por la ayuda!

[1] /usr/lib/python2.6/dist-packages/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen2

Roberto Alsina / 2009-10-16 03:17:

Buenisimo, cualquier cosa chiflá nomás!

Lamentablemente ese warning es en uniconvertor, asi que no lo puedo esconder :-)

Roberto Alsina / 2009-10-16 03:17:

Buenisimo, cualquier cosa chiflá nomás!

Lamentablemente ese warning es en uniconvertor, asi que no lo puedo esconder :-)


Contents © 2000-2023 Roberto Alsina