swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] pdf2swf and extra margins


From: Jörg Birkhold
Subject: Re: [Swftools-common] pdf2swf and extra margins
Date: Fri, 23 Nov 2007 15:43:57 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

hello,

what dll ist that? gfx.dll?

best regards

joerg

Matthias Kramm schrieb:
On Thu, Nov 22, 2007 at 11:05:22PM +0100, Pablo Rodríguez wrote:
The issue here is that one must know the page size in order to set the
new width or height. This is a real problem when converting
automatically different files with different page sizes.

In that case, try the following Python script:

-----------------------------------------------------------------------
#!/usr/bin/python
import gfx

add_to_x = 100
add_to_y = 100

doc = gfx.open("pdf", "file.pdf")
swf = gfx.SWF()
for pagenr in range(doc.pages):
    page = doc.getPage(pagenr+1)
    swf.startpage(page.width + add_to_x, page.height + add_to_y)
    page.render(swf)
    swf.endpage()

swf.save("file.swf")
-----------------------------------------------------------------------

You'll need to compile gfx.so / gfx.dll for this to work.

Greetings

Matthias







--
//------------------------------
Liquidnight
Jörg Birkhold
Vorwerk 1c
29640 Schneverdingen

email: address@hidden

phone: +49 [0]5193.972021
mobile: +49 [0]179.9080480

//------------------------------





reply via email to

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