Closed GoogleCodeExporter closed 8 years ago
AlivePDFBug.mxml contents
----------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
minWidth="955" minHeight="600">
<mx:Script>
<![CDATA[
import org.alivepdf.display.Display;
import org.alivepdf.fonts.CoreFont;
import org.alivepdf.fonts.FontFamily;
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.Method;
private function createPDF():void
{
var pdf:PDF = new PDF(Orientation.LANDSCAPE, Unit.MM, true, Size.LETTER);
pdf.setDisplayMode(Display.FULL_PAGE, Layout.SINGLE_PAGE);
pdf.setMargins(12.7, 12.7, 12.7, 12.7); //12.7mm is 1/2 inch margins
pdf.setFont(new CoreFont(FontFamily.ARIAL), 12);
pdf.addPage();
pdf.writeFlashHtmlText(5, '<p>This text should all be on the same line</p>');
var file:FileReference = new FileReference();
var bytes:ByteArray = pdf.save(Method.LOCAL);
file.save(bytes, "generated.pdf");
}
]]>
</mx:Script>
<mx:Button label="Create PDF" click="createPDF()" />
</mx:Application>
Original comment by jamie...@insightbb.com
on 19 Apr 2011 at 9:47
fixed in r281.
Thanks for reporting the issue.
Original comment by felix.ge...@gmail.com
on 8 Oct 2011 at 8:50
Original issue reported on code.google.com by
jamie...@insightbb.com
on 19 Apr 2011 at 9:40Attachments: