views:

258

answers:

3

ok, here's the problem:

  • the format of the vector graphics could be either SWF or SVG, which is up to me to choose
  • the text can have about any font
  • both text and graphics can be rotated and moved, and graphics can be scaled too

i considered doing this on clientside, which is flash player 9, using alivePDF, but 1. it does not support many fonts, 2. the code is really a little monolithic and unstructured, so i have no real clue, where to start hacking that in myself ...

so i thought, maybe do that on the server side ... so my question is, does anyone know of libraries/tools, that make this feasible in an easy way? i'd really not like to parse the traverse the vector-graphics and draw them into the PDF myself ...

+3  A: 

The iText library (Java, but has been ported to many, including a .NET port called iTextSharp) has facilities to include SVG in the PDF's it generates. There's a pretty good book on iText from Manning as well.

J Wynia
thanks, i'll check it out ...
back2dos
+1  A: 

ok, iText was a good pointer, and i am sure, this lib can do ANYTHING i want to ... but i'm too lazy for that ... :)

there is a stupid simple solution however: have the graphics on the server as SVGs, convert them to SWFs for the client (with swfmill) ... and for rendering the PDF, use transformation data sent from client, as well as texts/graphics ids to compose a new SVG ... and then SVG2PDF it with a decent tool ...

back2dos
i feel a little strange for accepting my own answer, but it worked the best for me ... sorry for bothering you guys and thanks for the input ...
back2dos
+2  A: 

reportlab (python) + svglib or svglib itself should do what you want

ADAM