[reportlab-users] Problem with <sub> and Ghostscript.

Henning von Bargen reportlab-users@reportlab.com
Tue, 22 Apr 2003 16:01:27 +0200


Hi all, I tried converting formatted text to an image file
this way:
1. create PDF from the formatted text using reportlab platypus Paragraph.
2. use GhostScript to render the PDF into a bitmap.
3. crop the image

This is working well with text like that:
	<b>bold</b> and <font color="red"><i>red italic</i></font>
However, when I try this text:
	The chemical formula for water is H<sub>2</sub>O.

Then it will be rendered like this:
H
  2O
instead of
H O
 2

The PDF looks correct in Acrobat Reader.

Is this a problem of reportlab or ghostscript?

Perhaps there is an easier solution for rendering formatted text to images?
My first idea was to use RenderPM,
but I don't know how to draw into an image using platypus.

Henning