Have you ever wanted to take the UI display of your Flex application and convert it directly to a *PDF? In an example of one technique that works, using an AS 3 PNG encoder,
I pass an NDA signature drawing as binary data to a ColdFusion CFC function and save the PNG to disk. Next, leveraging a cool open source tool, KVEC, I pass the PNG filename, created in
step one, to another CFC function that converts the PNG to a SVG file. Finally, the filename of the SVG is passed to a CFC function that completes the final conversion
to a *PDF file, using the Apache Batik project's batik-rasterizer.jar (that converts SVG to a PDF). To save on disk space, I use one final CFC function to delete the PNG and SVG files, once the *PDF is created.
* The PDF contents of your Flex UI are no longer subject to pixelation when enlarged, the graphics now being vector-based.
Try It |