AlivePDF is a open source PDF library which allows you to leverage PDF functionality with your Adobe Flex applications. It is completely client based and seems to be the best library out there at the moment unless you want to go with the more heavy Adobe Livecycle option. AlivePDF allows you to do both customized printing of drawn objects and text as well as capturing and printing MXML screens. A downside however, is that these captured controls wont be vectorized but rather bitmapped when rendered into the PDF. Adobe Livecycle is probably the only meaningful alternative if you cant live with this.
Printing a flex application control as a PDF is really quite simple, the following actionscript snippet takes a UIComponent as an argument and prints that as a PDF. The referenced php script doesn’t actually do anything more than to set the content-type to pdf and creates the stream so the browser opens up the pdf in acrobat reader.
import mx.core.UIComponent;
import org.alivepdf.display.Display;
import org.alivepdf.images.ResizeMode;
import org.alivepdf.layout.Layout;
import org.alivepdf.layout.Orientation;
import org.alivepdf.layout.Size;
import org.alivepdf.layout.Unit;
import org.alivepdf.pdf.PDF;
import org.alivepdf.saving.Download;
import org.alivepdf.saving.Method;
private function printPDF(objToPrint:UIComponent):void{
var printPDF:PDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.A4 );
printPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );
printPDF.addPage();
printPDF.addImage( objToPrint, 0, 0, 0, 0, ‘PNG’, 100, 1, ResizeMode.FIT_TO_PAGE );
printPDF.save( Method.REMOTE, "/create.php", Download.INLINE, "test.pdf" );
}
As I said, this has the downside of printing the object not vectors but as a PNG blob. If you want to go ahead and get real text and graphics in your pdf, you will have to use the built in drawing functionality. The built in functionality supports printing text, datagrid/tables, images, lines, circles and a whole lot more but seems to require you to redefine everything manually using objects.
AlivePDF were present at MAX ‘09 and the video recording from their session is here, jump to around 11:30. Some of the pros and cons between LiveCycle and AlivePDF, from that session, can be seen below

I’d say the title is a little misleading… “rendering PDF files” sounds like you are loading a PDF file and displaying it. Whereas AlivePDF does the opposite, takes data and creates a PDF file.
Fair enough
Title changed