473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Looking for a HTML like rendering library (wishlist)


Hello,

I'm looking for a library that can do the following:

* Parse a simple structured text file (XML or HTML etc.)
* Render its output to an image
* I would like to give the maximum width of the image (but not the
minimum)
* I would like to use my custom TrueType fonts, and some basic
formatting: colors, underline, numbered and bulleted lists
* I would like to embed some PNG (transparent) images, and align
them inside the text
* The library should be able to calculate the size of the image
before rendering
* The library should be able to render the image into memory
* It should be reasonably fast
* It should be independent of windowing toolkits (PIL is okay)
Why I need this: create widgets in GUI applications, for example:

* A label that can display formatted text
* A new grid cell renderer that can display small images and text as
well
* Hint window (tooltip) that has formatted text and images
* Create automatic signatures for e-mails (not GUI related)
* etc

I tried to implement something similar in pure Python, PyXRP and PIL. I
could do it, but either it was too slow (10 frames per sec on 300x300
final size) or consumed too much memory.
Do you know any alternative?

Thanks,

Laszlo
Jul 10 '06 #1
1 1754
Laszlo Nagy wrote:
I'm looking for a library that can do the following:

* Parse a simple structured text file (XML or HTML etc.)
* Render its output to an image
* I would like to give the maximum width of the image (but not the
minimum)
* I would like to use my custom TrueType fonts, and some basic
formatting: colors, underline, numbered and bulleted lists
* I would like to embed some PNG (transparent) images, and align
them inside the text
* The library should be able to calculate the size of the image
before rendering
* The library should be able to render the image into memory
* It should be reasonably fast
* It should be independent of windowing toolkits (PIL is okay)
Why I need this: create widgets in GUI applications, for example:

* A label that can display formatted text
* A new grid cell renderer that can display small images and text as
well
* Hint window (tooltip) that has formatted text and images
* Create automatic signatures for e-mails (not GUI related)
* etc
After reading this, I still do not understand why you want to do this with
images. Virtually any GUI toolkit can display text, most can natively display
HTML, just look at Qt for a good example.

So why not just use the native features?

Stefan
Jul 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gf gf | last post by:
Hans, Thanks for the tip. I took a look at Beatiful Soup, and it looked like it was a framework to parse HTML. I'm not really interetsed in going through it tag by tag - just to get it...
4
by: Frank Einstein | last post by:
Looking for a tool that can edit an XML file in a browser. The basic requirement is that the XML file is rendered as an HTML form with editable fields (including add/delete, preferably in...
71
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's...
38
by: Jukka K. Korpela | last post by:
As well all know, valid markup is important... but when trying to find a convincing modern argument in favor of this, I found pages like http://www.htmlhelp.com/tools/validator/reasons.html which...
81
by: sinister | last post by:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested...
83
by: newby2c | last post by:
My personal K&R (3rd edition) wish list: 1. That a 3rd edition is actually published! 2. Make any and all corrections from earlier editions. 3. Update to comply with the c99 Standard. 4. A...
0
by: pepsi | last post by:
Hello, I would suggest a simple div tag... you could assign it a id and runat server. It should work. pepsi >-----Original Message----- >Hi gang. I tried posting this under a different...
19
by: phoenixathell | last post by:
Hi all, the PyHtmlGUI Project (http://www.sourceforge.net/projects/pyhtmlgui) is looking for developers that want to join. The aim of the project is to create a web application framework. The...
1
by: Amogh Hooshdar | last post by:
Hi, I wish to know which python library is popular for SOAP related programming, especially for sending SOAP requests and parsing SOAP responses. I can't find any such library in the Python...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.