hello everyone. i use gfx python code to custom my output, but it doesn't work. 
below is my code (get it from  http://www.swftools.org/gfx_tutorial.html), it 
return segmentation error , it seems it was ths drawchar function , when i 
remove it , it is ok .
  Another question: how can i get more example codes or documents about gfx 
programming from pdf to html5 etc. Thanks! 


import gfx
class MyOutput:
    def __init__ (self):
        pass


    def setparameter(self,key,value):
        print "setparameter",key,value
    def startclip(self,outline):
        print "startclip",outline
    def endclip(self):
        print "endclip"
    def stroke(self,outline, width, color, capstyle, jointstyle, miterLimit):
        print "stroke",outline
    def fill(self,outline, color):
        print "fill",outline
    def fillbitmap(self,outline, image, matrix, colortransform):
        print "fillbitmap",outline
    def fillgradient(self,outline, gradient, gradienttype, matrix):
        print "fillgradient",outline
    def addfont(self,font):
        print "addfont"
    def drawchar(self,font, glyph, color, matrix):
        print 'font'
    def drawlink(self,outline, url):
        print "drawlink", outline, url
    
doc = gfx.open("pdf", "e.pdf")
output = gfx.PassThrough(MyOutput())
doc.getPage(1).render(output)
---------------
SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an 
existing subscription, please kindly point your favourite web browser 
at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>

Reply via email to