swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Python gfx module and -O1


From: Yurij Bilas
Subject: Re: [Swftools-common] Python gfx module and -O1
Date: Thu, 12 Jun 2008 08:50:45 -0700 (PDT)

After some digging around here's what I've found.
I have two-page pdf, first page is rendered perfectly, problems start on the 
second page (and any consequent if more than 2).
Something seems to not properly initialize/destroy in between the calls to 
gfx.SWF()

I'm attaching output from verbose(5).
Sorry, I did make mistakes when I typed my code...here's the exact copy/pasted 
code I use:
------------------
import gfx
import os

class Converter:
    def __init__(self):
        pass
    def convert_pdf(self,file_in,file_out):
        gfx.verbose(5)
        doc = gfx.open("pdf", file_in)
        for pagenr in range(1,doc.pages+1):
            swf = gfx.SWF()
            page = doc.getPage(pagenr)
            swf.startpage(page.width, page.height)
            page.render(swf)
            swf.endpage()
            full_file_out = "%s-%d" % (file_out,pagenr)
            swf.save(full_file_out)
        return pagenr
---------------

Thanks.

----- Original Message ----
From: Matthias Kramm <address@hidden>
To: address@hidden
Sent: Thursday, June 12, 2008 10:53:20 AM
Subject: Re: [Swftools-common] Python gfx module and -O1

On Thu, Jun 12, 2008 at 07:13:58AM -0700, Yurij Bilas <address@hidden> wrote:
> WARNING swf_drawchar: Font is NULL
> ERROR Uknown font id: Times-Roman-6-0
> WARNING swf_drawchar: Font is NULL
> ERROR Uknown font id: Helvetica-7-0

Weird. Could you increase the verbosity level?
Put 
    gfx.verbose(5)
at the start of your code.

> doc.open("pdf","my_pdf.pdf")

I assume that's doc = gfx.open(...)

> page = doc.getPage(0)

and getPage(1) (page indexes start with 1)

Which freetype version are you using, btw.?

Greetings

Matthias


      

Attachment: gfx.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]