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