protected var addTextColor:String
protected var aliasNbPages:String
protected var angle:Number
protected var arrayNotes:Array
protected var arrayPages:Array
protected var autoPageBreak:Boolean
protected var autoPagination:Boolean
protected var bMargin:Number
protected var buffer:ByteArray
protected var cMargin:Number
protected var colorFlag:Boolean
protected var columnNames:Array
protected var columns:Array
protected var compress:Boolean
protected var compressedPages:ByteArray
protected var currentFont:Object
protected var currentGrid:Grid
protected var currentOrientation:String
protected var currentPage:Page
protected var currentX:Number
protected var currentY:Number
protected var defaultOrientation:String
protected var defaultRotation:int
protected var defaultSize:Size
protected var defaultUnit:String
protected var desc:String
protected var diff:Number
protected var diffs:Array
protected var dispatcher:EventDispatcher
protected var documentAuthor:String
protected var documentCreator:String
protected var documentKeywords:String
protected var documentSubject:String
protected var documentTitle:String
protected var drawingRule:String
protected var encryptRef:int
protected var extgstates:Array
protected var file:String
protected var fillColor:String
protected var filled:Boolean
protected var filter:String
protected var fontFamily:String
protected var fontFiles:Array
protected var fontkey:String
protected var fonts:Object
protected var fontSize:Number
protected var fontSizePt:Number
protected var fontStyle:String
protected var image:PDFImage
protected var inFooter:Boolean
protected var inHeader:Boolean
protected var inited:Boolean
isCompressed:Boolean
Lets you activate zlib compression for the current PDF
Implementation public function get isCompressed():Boolean
public function set isCompressed(value:Boolean):void
Example This example shows how to activate zlib compression :
protected var lasth:Number
protected var layoutMode:String
protected var lineWidth:Number
protected var links:Array
protected var lMargin:Number
protected var matrix:Matrix
protected var name:String
protected var nbPages:int
protected var offsets:Array
protected var orientationChanges:Array
protected var originalsize:Number
protected var outlineRoot:int
protected var outlines:Array
protected var pageBreakTrigger:Number
protected var pageLinks:Array
protected var pageMode:String
protected var pdfVersion:String
protected var reference:String
protected var references:String
protected var rMargin:Number
protected var rotationMatrix:Matrix
protected var size1:Number
protected var size2:Number
protected var standardFonts:Object
protected var streamDictionary:Dictionary
protected var strokeStyle:String
protected var textRendering:int
protected var tMargin:Number
totalPages:int
[read-only]
Lets you retrieve the number of pages in the PDF document
Implementation public function get totalPages():int
Example This example shows how to retrieve the number of pages :
protected var type:String
protected var underline:Boolean
protected var viewerPreferences:String
protected var windingRule:String
protected var zoomFactor:Number
protected var zoomRectangle:Rectangle
public function PDF(orientation:String = Portrait, unit:String = Mm, pageSize:Object = null, rotation:int = 0)
The PDF class represents a PDF document.
Parameters | orientation:String (default = Portrait )
|
|
| unit:String (default = Mm )
|
|
| pageSize:Object (default = null )
|
|
| rotation:int (default = 0 )
|
Example This example shows how to create a valid PDF document :
protected function acceptPageBreak():Boolean
Returns public function addBookmark(text:String, level:int, y:Number, color:RGBColor):void
Lets you add a bookmark
Parameters
| text:String — Text appearing in the outline panel
|
|
| level:int — Specify the bookmark's level
|
|
| y:Number — Position in the current page to go
|
|
| color:RGBColor — Red offset for the text color
|
Example This example shows how to add a bookmark for the current page :
public function addCell(width:Number = 0, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:String):void
Add a cell with some text to the current page
Parameters
| width:Number (default = 0 ) — Cell width
|
|
| height:Number (default = 0 ) — Cell height
|
|
| text:String — Text to add into the cell
|
|
| border:* (default = 0 ) — Sets the new position after cell is drawn, default value is 0
|
|
| ln:Number (default = 0 ) — Lets you center or align the text into the cell
|
|
| align:String — Lets you specify if the cell is colored (1) or transparent (0)
|
|
| fill:Number (default = 0 ) — Any http link, like http://www.mylink.com
|
|
| link:String |
Example This example shows how to write some text within a cell :
This example shows how to write some clikable text within a cell :
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Parameters
| type:String |
|
| listener:Function |
|
| useCapture:Boolean (default = false )
|
|
| priority:int (default = 0 )
|
|
| useWeakReference:Boolean (default = false )
|
protected function addExtGState(graphicState:Object):int
Parameters
Returns public function addGrid(grid:Grid, x:Number = 0, y:Number = 0, repeatHeader:Boolean = true):void
Parameters
| grid:Grid |
|
| x:Number (default = 0 )
|
|
| y:Number (default = 0 )
|
|
| repeatHeader:Boolean (default = true )
|
public function addImage(displayObject:DisplayObject, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, imageFormat:String = PNG, quality:Number = 100, alpha:Number = 1, resizeMode:String = None, blendMode:String = Normal, keepTransformation:Boolean = true, link:String):void
The addImage method takes an incoming DisplayObject. A JPG or PNG snapshot is done and included in the PDF document
Parameters
| displayObject:DisplayObject |
|
| x:Number (default = 0 )
|
|
| y:Number (default = 0 )
|
|
| width:Number (default = 0 )
|
|
| height:Number (default = 0 )
|
|
| imageFormat:String (default = PNG )
|
|
| quality:Number (default = 100 )
|
|
| alpha:Number (default = 1 )
|
|
| resizeMode:String (default = None )
|
|
| blendMode:String (default = Normal )
|
|
| keepTransformation:Boolean (default = true )
|
|
| link:String |
Example This example shows how to add a 100% compression quality JPG image into the current page at a position of 0,0 with no resizing behavior :
public function addImageStream(imageBytes:ByteArray, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, alpha:Number = 1, resizeMode:String = None, blendMode:String = Normal, keepTransformation:Boolean = true, link:String, isMask:Boolean = false):void
The addImageStream method takes an incoming image as a ByteArray. This method can be used to embed high-quality images (300 dpi) to the PDF
Parameters
| imageBytes:ByteArray |
|
| x:Number (default = 0 )
|
|
| y:Number (default = 0 )
|
|
| width:Number (default = 0 )
|
|
| height:Number (default = 0 )
|
|
| alpha:Number (default = 1 )
|
|
| resizeMode:String (default = None )
|
|
| blendMode:String (default = Normal )
|
|
| keepTransformation:Boolean (default = true )
|
|
| link:String |
|
| isMask:Boolean (default = false )
|
Example This example shows how to add an image as a ByteArray into the current page with a page resize behavior :
public function addLink(x:Number, y:Number, width:Number, height:Number, link:*, highlight:String = I):void
Lets you add clickable link to a specific position
Parameters
| x:Number — Page Format, can be Size.A3, Size.A4, Size.A5, Size.LETTER or Size.LEGAL
|
|
| y:Number |
|
| width:Number |
|
| height:Number |
|
| link:* |
|
| highlight:String (default = I )
|
Example This example shows how to add an invisible clickable link in the current page :
public function addMultiCell(width:Number, height:Number, text:String, border:* = 0, align:String = J, filled:int = 0):void
Add a multicell with some text to the current page
Parameters
| width:Number — Cell width
|
|
| height:Number — Cell height
|
|
| text:String — Text to add into the cell
|
|
| border:* (default = 0 ) — Lets you specify if a border should be drawn around the cell
|
|
| align:String (default = J ) — Lets you center or align the text into the cell, values can be L (left align), C (centered), R (right align), J (justified) default value
|
|
| filled:int (default = 0 ) — Lets you specify if the cell is colored (1) or transparent (0)
|
Example This example shows how to write a table made of text cells :
public function addPage(page:Page = null):Page
Lets you add a page to the current PDF
Parameters
| page:Page (default = null )
|
Returns Example
This example shows how to add an A4 page with a landscape orientation :
This example shows how to add a page with a custom size :
public function addStampNote(style:String, x:Number, y:Number, width:Number, height:Number):void
Lets you add a stamp annotation to the current page
Parameters
| style:String — Stamp style can be StampStyle.CONFIDENTIAL, StampStyle.FOR_PUBLIC_RELEASE, etc.
|
|
| x:Number — Note X position
|
|
| y:Number — Note Y position
|
|
| width:Number — Note width
|
|
| height:Number — Note height
|
Example This example shows how to add a stamp annotation in the current page :
public function addText(text:String, x:Number = 0, y:Number = 0):void
Lets you set some text to any position on the page
Parameters
| text:String — The text to add
|
|
| x:Number (default = 0 ) — X position
|
|
| y:Number (default = 0 ) — Y position
|
Example This example shows how to set some text to a specific place :
public function addTextNote(x:Number, y:Number, width:Number, height:Number, text:String = A note !):void
Lets you add a text annotation to the current page
Parameters
| x:Number — Note X position
|
|
| y:Number — Note Y position
|
|
| width:Number — Note width
|
|
| height:Number — Note height
|
|
| text:String (default = A note ! ) — Text for the note
|
Example This example shows how to add a note annotation in the current page :
public function addTransition(style:String = R, duration:Number = 1, dimension:String = H, motionDirection:String = I, transitionDirection:int = 0):void
Lets you add a transition between each PDF page
Note : PDF must be shown in fullscreen to see the transitions, use the setDisplayMode method with the PageMode.FULL_SCREEN parameter
Parameters
| style:String (default = R ) — Transition style, can be Transition.SPLIT, Transition.BLINDS, BLINDS.BOX, Transition.WIPE, etc.
|
|
| duration:Number (default = 1 ) — The transition duration
|
|
| dimension:String (default = H ) — The dimension in which the the specified transition effect occurs
|
|
| motionDirection:String (default = I ) — The motion's direction for the specified transition effect
|
|
| transitionDirection:int (default = 0 ) — The direction in which the specified transition effect moves
|
Example This example shows how to add a 4 seconds "Wipe" transition between the first and second page :
public function addVerticalText(text:String, x:Number = 0, y:Number = 0):void
Parameters
| text:String |
|
| x:Number (default = 0 )
|
|
| y:Number (default = 0 )
|
public function beginFill(color:Color):void
Sets the filling color for different color spaces CMYK/RGB/DEVICEGRAY
Parameters
| color:Color — Color object, can be CMYKColor, GrayColor, or RGBColor
|
Example This example shows how to create a red rectangle in the current page :
protected function close():void
protected function createCatalog():void
protected function createHeader():void
protected function createPageTree():void
protected function createTrailer():void
protected function curve(x1:Number, y1:Number, x2:Number, y2:Number, x3:Number, y3:Number):void
Parameters
| x1:Number |
|
| y1:Number |
|
| x2:Number |
|
| y2:Number |
|
| x3:Number |
|
| y3:Number |
public function curveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, finalX3:Number, finalY3:Number):void
The curveTo method draws a cubic bezier curve
Parameters
| controlX1:Number |
|
| controlY1:Number |
|
| controlX2:Number |
|
| controlY2:Number |
|
| finalX3:Number |
|
| finalY3:Number |
Example This example shows how to draw some curves lines in the current page :
Important : Always call the end() method when you're done
public function dispatchEvent(event:Event):Boolean
Parameters
Returns protected function doUnderline(x:Number, y:Number, content:String):String
Parameters
| x:Number |
|
| y:Number |
|
| content:String |
Returns public function drawCircle(x:Number, y:Number, radius:Number):void
The drawCircle method draws a circle
Parameters
| x:Number — X Position
|
|
| y:Number — Y Position
|
|
| radius:Number — Circle Radius
|
Example This example shows how to create a rounded red ellipse in the current page :
public function drawComplexRoundRect(rect:Rectangle, topLeftEllipseWidth:Number, bottomLeftEllipseWidth:Number, topRightEllipseWidth:Number, bottomRightEllipseWidth:Number):void
The drawComplexRoundRect method draws a rounded rectangle shape
Parameters
| rect:Rectangle — A flash.geom.Rectange object
|
|
| topLeftEllipseWidth:Number — Angle radius
|
|
| bottomLeftEllipseWidth:Number — Angle radius
|
|
| topRightEllipseWidth:Number — Angle radius
|
|
| bottomRightEllipseWidth:Number — Angle radius
|
Example This example shows how to create a complex rounded green rectangle (different angles radius) in the current page :
public function drawEllipse(x:Number, y:Number, radiusX:Number, radiusY:Number):void
The drawEllipse method draws an ellipse
Parameters
| x:Number — X Position
|
|
| y:Number — Y Position
|
|
| radiusX:Number — X Radius
|
|
| radiusY:Number — Y Radius
|
Example This example shows how to create a rounded red ellipse in the current page :
public function drawPolygone(points:Array):void
The drawPolygone method draws a polygone
Parameters
| points:Array — Array of points
|
Example This example shows how to create a polygone with a few points :
public function drawRect(rect:Rectangle):void
The drawRect method draws a rectangle shape
Parameters
| rect:Rectangle — A flash.geom.Rectange object
|
Example This example shows how to create a blue rectangle in the current page :
public function drawRoundRect(rect:Rectangle, ellipseWidth:Number):void
The drawRoundedRect method draws a rounded rectangle shape
Parameters
| rect:Rectangle — A flash.geom.Rectange object
|
|
| ellipseWidth:Number — Angle radius
|
Example This example shows how to create a rounded green rectangle in the current page :
public function end():void
The end method closes the stroke
Example This example shows how to draw some dashed lines in the current page with specific caps style and joint style :
Important : Always call the end() method when you're done
public function endFill():void
Ends all previous filling
Example This example shows how to create a red rectangle in the current page :
protected function escape(content:String):String
Parameters
Returns protected function escapeString(content:String):String
Parameters
Returns protected function findAndReplace(search:String, replace:String, source:String):String
Parameters
| search:String |
|
| replace:String |
|
| source:String |
Returns protected function finish():void
protected function finishDocument():void
protected function finishPage():void
public function footer():void
protected function getChannels(color:Number):String
Parameters
Returns protected function getCurrentDate():String
Returns public function getCurrentPage():Page
Lets you retrieve the current Page
Returns | Page — Page A Page object
|
Example This example shows how to retrieve the current page :
public function getDefaultOrientation():String
Returns the default PDF orientation
Returns public function getDefaultSize():Size
Returns the default PDF Size
Returns public function getDefaultUnit():String
Returns the default PDF unit unit
Returns protected function getFontStyleString(bold:Boolean, italic:Boolean, underline:Boolean):String
Parameters
| bold:Boolean |
|
| italic:Boolean |
|
| underline:Boolean |
Returns public function getMargins():Rectangle
Lets you retrieve the margins dimensions
Returns Example This example shows how to get the margins dimensions :
protected function getNumImages(object:Object):int
Parameters
Returns public function getPage(page:int):Page
Lets you retrieve a Page object
Parameters
| page:int — page number, from 1 to total numbers of pages
|
Returns Example This example shows how to retrieve the first page :
public function getPages():Array
Lets you retrieve all the PDF pages
Returns Example This example shows how to retrieve all the PDF pages :
protected function getStringWidth(content:String):Number
Parameters
Returns public function getX():Number
Lets you retrieve the X position for the current page
Returns | Number — Number the X position
|
public function getY():Number
Lets you retrieve the Y position for the current page
Returns | Number — Number the Y position
|
public function gotoPage(page:int):void
Lets you move to a Page in the PDF
Parameters
| page:int — page number, from 1 to total numbers of pages
|
Example This example shows how to move to the first page :
public function hasEventListener(type:String):Boolean
Parameters
Returns public function header():void
protected function insertBookmarks():void
protected function insertExtGState():void
protected function insertFonts():void
protected function insertImages():void
protected function insertInfos():void
protected function lineBreak(pHeight:Number):void
Parameters
public function lineStyle(color:Color, thickness:Number = 1, flatness:Number = 0, alpha:Number = 1, rule:String = NonZeroWinding, blendMode:String = Normal, style:DashedLine = null, caps:String = null, joints:String = null, miterLimit:Number = 3):void
Sets the stroke style
Parameters
| color:Color |
|
| thickness:Number (default = 1 )
|
|
| flatness:Number (default = 0 )
|
|
| alpha:Number (default = 1 )
|
|
| rule:String (default = NonZeroWinding )
|
|
| blendMode:String (default = Normal )
|
|
| style:DashedLine (default = null )
|
|
| caps:String (default = null )
|
|
| joints:String (default = null )
|
|
| miterLimit:Number (default = 3 )
|
Example This example shows how to draw a star with an "even odd" rule :
This example shows how to draw a star with an "non-zero" winding rule :
public function lineTo(x:Number, y:Number):void
Lets you draw a stroke from the current point to the new point
Parameters
| x:Number — X position
|
|
| y:Number — Y position
|
Example This example shows how to draw some dashed lines in the current page with specific caps style and joint style :
Important : Always call the end() method when you're done
public function moveTo(x:Number, y:Number):void
Lets you move the current drawing point to the specified destination
Parameters
| x:Number — X position
|
|
| y:Number — Y position
|
Example This example shows how to move the pen to 120,200 :
public function newLine(height:*):void
Lets you insert a line break for text
Parameters
| height:* — Line break height
|
Example This example shows how to add a line break :
protected function newObj():void
protected function open():void
protected function parseTags(myXML:XML):Array
Parameters
Returns public function removeAllPages():void
Lets you remove all the pages from the PDF
Example This example shows how to remove all the pages :
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Parameters
| type:String |
|
| listener:Function |
|
| useCapture:Boolean (default = false )
|
public function removePage(page:int):Page
Lets you remove a Page from the PDF
Parameters
| page:int — page number, from 1 to total numbers of pages
|
Returns Example This example shows how to remove the first page :
protected function renderLine(lineArray:Array, align:String):void
Parameters
| lineArray:Array |
|
| align:String |
public function rotate(angle:Number, x:Number = -1, y:Number = -1):void
Parameters
| angle:Number |
|
| x:Number (default = -1 )
|
|
| y:Number (default = -1 )
|
public function rotatePage(number:int, rotation:Number):void
Lets you rotate a specific page (between 1 and n-1)
Parameters
| number:int — Page number
|
|
| rotation:Number — Page rotation (must be a multiple of 90)
|
Throws Example This example shows how to rotate the first page 90 clock wise :
This example shows how to rotate the first page 90 counter clock wise :
public function save(method:String, url:String, downloadMethod:String = inline, fileName:String = output.pdf, frame:String = _blank):*
Parameters
| method:String — Can be se to Method.LOCAL, the savePDF will return the PDF ByteArray. When Method.REMOTE is passed, just specify the path to the create.php file
|
|
| url:String — The url of the create.php file
|
|
| downloadMethod:String (default = inline ) — Lets you specify the way the PDF is going to be available. Use Download.INLINE if you want the PDF to be opened in the browser, use Download.ATTACHMENT if you want to make it available with a save-as dialog box
|
|
| fileName:String (default = output.pdf ) — The name of the PDF, only available when Method.REMOTE is used
|
|
| frame:String (default = _blank )
|
Returns | * — The ByteArray PDF when Method.LOCAL is used, otherwise the method returns null
|
Example This example shows how to save the PDF on the desktop with the AIR runtime :
This example shows how to save the PDF through a download dialog-box with Flash or Flex :
This example shows how to view the PDF in the browser with Flash or Flex :
public function setAliasNbPages(alias:String = {nb}):void
Lets you specify an alias for the total number of pages
Parameters
| alias:String (default = {nb} ) — Alias to use
|
Example This example shows how to show the total number of pages :
public function setAlpha(alpha:Number, blendMode:String = Normal):void
Lets you specify the opacity for the next drawing operations, from 0 (100% transparent) to 1 (100% opaque)
Parameters
| alpha:Number — Opacity
|
|
| blendMode:String (default = Normal ) — Blend mode, can be Blend.DIFFERENCE, BLEND.HARDLIGHT, etc.
|
Example This example shows how to set the transparency to 50% for any following drawing, image or text operation :
public function setAuthor(author:String):void
Sets the specified author for the PDF
Parameters
| author:String — The author
|
Example This example shows how to add a specific author to the PDF tags :
public function setAutoPageBreak(auto:Boolean, margin:Number):void
Lets you enable or disable auto page break mode and triggering margin
Parameters
| auto:Boolean — Page break mode
|
|
| margin:Number — Bottom margin
|
protected function setAutoPagination(activate:Boolean):void
Lets you activate the auto pagination mode
Parameters
| activate:Boolean — Activate the auto pagination mode
|
Example This example shows how to activate the auto pagination mode :
public function setBottomMargin(margin:Number):void
Lets you specify the bottom margin
Parameters
| margin:Number — Bottom margin
|
Example This example shows how set bottom margin for the PDF document :
public function setCreator(creator:String):void
Sets the specified creator for the PDF
Parameters
| creator:String — Name of the PDF creator
|
Example This example shows how to set a creator name to the PDF tags :
public function setDisplayMode(zoomStyle:String = FullWidth, layout:String = SinglePage, mode:String = UseNone, zoomValue:Number = 1, rectangle:Rectangle = null):void
Lets you set a specific display mode, the DisplayMode takes care of the general layout of the PDF in the PDF reader
Parameters
| zoomStyle:String (default = FullWidth ) — Zoom mode, can be Display.FULL_PAGE, Display.FULL_WIDTH, Display.REAL, Display.DEFAULT
|
|
| layout:String (default = SinglePage ) — Layout of the PDF document, can be Layout.SINGLE_PAGE, Layout.ONE_COLUMN, Layout.TWO_COLUMN_LEFT, Layout.TWO_COLUMN_RIGHT
|
|
| mode:String (default = UseNone ) — PageMode can be pageMode.USE_NONE, PageMode.USE_OUTLINES, PageMode.USE_THUMBS, PageMode.FULL_SCREEN
|
|
| zoomValue:Number (default = 1 )
|
|
| rectangle:Rectangle (default = null )
|
Example This example creates a PDF which opens at full page scaling, one page at a time :
To create a full screen PDF you would write :
protected function setExtGState(graphicState:int):void
Parameters
public function setFont(family:String, style:String, size:int = 0):void
Lets you set a specific font
Parameters
| family:String — Font family, can be any of FontFamily.COURIER, FontFamily.HELVETICA, FontFamily.ARIAL, FontFamily.TIMES, FontFamily.SYMBOL, FontFamily.ZAPFDINGBATS.
|
|
| style:String — Any font style, can be Style.BOLD, Style.ITALIC, Style.BOLD_ITALIC, Style.NORMAL
|
|
| size:int (default = 0 )
|
Example This example shows how to set the Helvetica font, with a bold style :
public function setFontSize(size:int):void
Lets you set a new size for the current font
Parameters
Example This example shows how to se the current font to 18 :
public function setKeywords(keywords:String):void
Sets the specified keywords for the PDF
Parameters
| keywords:String — The keywords
|
Example This example shows how to add some keywords to the PDF tags :
public function setLeftMargin(margin:Number):void
Lets you specify the left margin
Parameters
| margin:Number — Left margin
|
Example This example shows how set left margin for the PDF document :
public function setMargins(left:Number, top:Number, right:Number = -1, bottom:Number = 20):void
Lets you specify the left, top, and right margins
Parameters
| left:Number — Left margin
|
|
| top:Number — Right number
|
|
| right:Number (default = -1 ) — Top number
|
|
| bottom:Number (default = 20 ) — Bottom number
|
Example This example shows how to set margins for the PDF document :
public function setRightMargin(margin:Number):void
Lets you specify the right margin
Parameters
| margin:Number — Right margin
|
Example This example shows how set right margin for the PDF document :
public function setSubject(subject:String):void
Lets you set a subject for the PDF
Parameters
| subject:String — The subject
|
Example This example shows how to set a specific subject to the PDF tags :
public function setTitle(title:String):void
Lets you set a title for the PDF
Parameters
Example This example shows how to set a specific title to the PDF tags :
public function setTopMargin(margin:Number):void
Lets you specify the top margin
Parameters
| margin:Number — Top margin
|
Example This example shows how set top margin for the PDF document :
public function setUnit(unit:String):String
Parameters
Returns public function setViewerPreferences(toolbar:String = false, menubar:String = false, windowUI:String = false, fitWindow:String = false, centeredWindow:String = false, displayTitle:String = false):void
Lets you control the way the document is to be presented on the screen or in print.
Parameters
| toolbar:String (default = false ) — Toolbar behavior
|
|
| menubar:String (default = false ) — Menubar behavior
|
|
| windowUI:String (default = false ) — WindowUI behavior
|
|
| fitWindow:String (default = false ) — Specify whether to resize the document's window to fit the size of the first displayed page.
|
|
| centeredWindow:String (default = false ) — Specify whether to position the document's window in the center of the screen.
|
|
| displayTitle:String (default = false ) — Specify whether the window's title bar should display the document title taken from the value passed to the setTitle method
|
Example This example shows how to present the document centered on the screen with no toolbars :
public function setX(x:Number):void
Lets you specify the X position for the current page
Parameters
| x:Number — The X position
|
public function setXY(x:Number, y:Number):void
Lets you specify the X and Y position for the current page
Parameters
| x:Number — The X position
|
|
| y:Number — The Y position
|
public function setY(y:Number):void
Lets you specify the Y position for the current page
Parameters
| y:Number — The Y position
|
public function skew(ax:Number, ay:Number, x:Number = -1, y:Number = -1):void
Parameters
| ax:Number |
|
| ay:Number |
|
| x:Number (default = -1 )
|
|
| y:Number (default = -1 )
|
protected function startPage(newOrientation:String):Page
Parameters
Returns public function startTransform():void
public function stopTransform():void
protected function strokeColor(color:Color):void
Sets the stroke color for different color spaces CMYK, RGB and DEVICEGRAY
Parameters
protected function substrCount(content:String, search:String):int
Parameters
| content:String |
|
| search:String |
Returns protected function textColor(color:Color):void
Sets the text color for different color spaces CMYK, RGB, and DEVICEGRAY
Parameters
public function textStyle(color:Color, alpha:Number = 1, rendering:int = 0, wordSpace:Number = 0, characterSpace:Number = 0, scale:Number = 100, leading:Number = 0):void
Sets the text style
Parameters
| color:Color — Color object, can be CMYKColor, GrayColor, or RGBColor
|
|
| alpha:Number (default = 1 ) — Text opacity
|
|
| rendering:int (default = 0 ) — pRendering Specify the text rendering mode
|
|
| wordSpace:Number (default = 0 ) — Spaces between each words
|
|
| characterSpace:Number (default = 0 ) — Spaces between each characters
|
|
| scale:Number (default = 100 ) — Text scaling
|
|
| leading:Number (default = 0 ) — Text leading
|
Example This example shows how to set a specific black text style with full opacity :
public function toString():String
Returns public function willTrigger(type:String):Boolean
Parameters
Returns protected function write(content:*):void
Parameters
public function writeFlashHtmlText(pHeight:Number, pText:String, pLink:String):void
Lets you write some text with basic HTML type formatting
Parameters
| pHeight:Number — Line height, lets you specify height between each lines
|
|
| pText:String — Text to write, to put a line break just add a \n in the text string
|
|
| pLink:String — Any link, like http://www.mylink.com, will open te browser when clicked
|
Example
Only a limited subset of tags are currently supported
used to create a new line
This example shows how to add some basic HTML text to the current page :
protected function writeResources():void
protected function writeResourcesDictionary():void
protected function writeStream(stream:String):void
Parameters
public function writeText(lineHeight:Number, text:String, link:String):void
Lets you write some text
Parameters
| lineHeight:Number — Line height, lets you specify height between each lines
|
|
| text:String — Text to write, to put a line break just add a \n in the text string
|
|
| link:String — Any link, like http://www.mylink.com, will open te browser when clicked
|
Example This example shows how to add some text to the current page :
This example shows how to add some text with a clickable link :
protected function writeXObjectDictionary():void
Event Object Type: org.alivepdf.events.PageEvent
PageEvent.type property = org.alivepdf.events.PageEvent.ADDED
Dispatched when a page has been added to the PDF. The addPage() method generate this event
Event Object Type: org.alivepdf.events.ProcessingEvent
ProcessingEvent.type property = org.alivepdf.events.ProcessingEvent.COMPLETE
Dispatched when PDF has been generated and available. The save() method generate this event
Event Object Type: org.alivepdf.events.ProcessingEvent
ProcessingEvent.type property = org.alivepdf.events.ProcessingEvent.PAGE_TREE
Dispatched when the PDF page tree has been generated. The save() method generate this event
Event Object Type: org.alivepdf.events.ProcessingEvent
ProcessingEvent.type property = org.alivepdf.events.ProcessingEvent.RESOURCES
Dispatched when the required resources (fonts, images, etc.) haven been written into the PDF. The save() method generate this event
Event Object Type: org.alivepdf.events.ProcessingEvent
ProcessingEvent.type property = org.alivepdf.events.ProcessingEvent.STARTED
Dispatched when the PDF generation has been initiated. The save() method generate this event
protected static const ALIVEPDF_VERSION:String = 0.1.4.8
protected static const PDF_VERSION:String = 1.3
Mon Oct 17 2011, 09:13 PM -04:00