Yes, it’s very simple to create a PDF using AlivePDF, here is a sample code, the first method creates a pdf file and the second method saves the pdf file to disk and returns the path, do not hesitate to ask any questions.
public function createFlexPdf() : String { pdf = new PDF(); pdf.setDisplayMode (Display.FULL_WIDTH,Layout.ONE_COLUMN,Mode.FIT_TO_PAGE,0.96); pdf.setViewerPreferences(ToolBar.SHOW,MenuBar.HIDE,WindowUI.SHOW,FitWindow.RESIZED,CenterWindow.CENTERED); pdf.addPage(); var myFontStyle:IFont = new CoreFont ( FontFamily.COURIER ); pdf.setFont(myFontStyle,10); pdf.addText('Kamran Aslam',10,20);
Kamran Aslam
source share