On Thu, Apr 23, 2009 at 05:36:31PM +0530, Bharat Varma <[email protected]> 
wrote:
> I am not too worried about the PDF not getting converted. I believe that
> this is because of some sort of gradients in the PDF.
> However, is it possible to catch some sort of exception or something to stop
> python from crashing ? That way, it would be easier to handle the error and
> make a recovery.

Try forking the conversion into a seperate thread:

if os.fork():
    page.render(swf)
    sys.exit(0)
else:
    os.wait()

That will make it possible to recover from this error.

Matthias




Reply via email to