Packageorg.alivepdf.billing
Classpublic class Invoice
InheritanceInvoice Inheritance PDF Inheritance Object



Public Properties
 PropertyDefined By
  dataEx : Array
[static]
Invoice
 InheritedtotalFonts : int
[read-only] Lets you retrieve the total number of fonts used in the PDF document.
PDF
 InheritedtotalPages : int
[read-only] Lets you retrieve the number of pages in the PDF document.
PDF
Public Methods
 MethodDefined By
  
Invoice(orientation:String = Portrait, unit:String = Mm, autoPageBreak:Boolean = true, pageSize:Size = null, rotation:int = 0)
Invoice
 Inherited
addAnnotation(annotation:Annotation):void
Lets you add an annotation to the current page
PDF
 Inherited
addBookmark(text:String, level:int = 0, y:Number = -1, color:RGBColor = null):void
Lets you add a bookmark.
PDF
  
Invoice
 Inherited
addCell(width:Number = 0, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
Add a cell with some text to the current page.
PDF
 Inherited
addCellFitScale(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
Adds a cell with horizontal scaling only if necessary
PDF
 Inherited
addCellFitScaleForce(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
Adds a cell with horizontal scaling always
PDF
 Inherited
addCellFitSpace(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
Adds a cell with character spacing only if necessary
PDF
 Inherited
addCellFitSpaceForce(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
Adds a cell with character spacing always
PDF
  
Invoice
 Inherited
addCodaBar(codaBar:CodaBar):void
Allows you to add a CodaBar (Monarch) to the current page at any position.
PDF
  
addCompany(company:Company):void
Invoice
  
addCompanyBox(company:Company, y:Number, align:String = L):void
Invoice
  
addDate(date:Object):void
Invoice
  
addEcheance(date:Object):void
Invoice
 Inherited
addEPSImage(stream:ByteArray, x:Number = 0, y:Number = 0, w:Number = 0, h:Number = 0, useBoundingBox:Boolean = true):void
The addEPSImage method takes an incoming EPS (.eps) file or Adobe® Illustrator® file (.ai) and render it on the current page.
PDF
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
PDF
 Inherited
addGrid(grid:Grid, x:Number = 0, y:Number = 0, repeatHeader:Boolean = true):void
Adds a dynamic table to the current page.
PDF
 Inherited
addImage(displayObject:DisplayObject, resizeMode:Resize = null, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, rotation:Number = 0, alpha:Number = 1, keepTransformation:Boolean = true, imageFormat:String = PNG, quality:Number = 100, blendMode:String = Normal, link:ILink = null):void
The addImage method takes an incoming DisplayObject.
PDF
 Inherited
addImageStream(imageBytes:ByteArray, colorSpace:String, resizeMode:Resize = null, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, rotation:Number = 0, alpha:Number = 1, blendMode:String = Normal, link:ILink = null):void
The addImageStream method takes an incoming image as a ByteArray.
PDF
 Inherited
addJavaScript(script:String):void
The addJavaScript allows you to inject JavaScript code to be executed when the PDF document is opened.
PDF
 Inherited
addLink(x:Number, y:Number, width:Number, height:Number, link:ILink, highlight:String = I):void
Lets you add clickable link to a specific position Link can be internal (document level navigation) or external (HTTP).
PDF
 Inherited
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.
PDF
 Inherited
addPage(page:Page = null):Page
Lets you add a page to the current PDF.
PDF
  
addReglement(mode:String):void
Invoice
  
addRemarque(remarque:String):void
Invoice
 Inherited
addText(text:String, x:Number = 0, y:Number = 0):void
Lets you set some text to any position on the page.
PDF
 Inherited
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.
PDF
 Inherited
beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null):void
The beginBitmapFill method fills a surface with a bitmap as a texture.
PDF
 Inherited
beginFill(color:IColor, tint:Number = 100):void
Sets the filling color for different color spaces CMYK, RGB or DEVICEGRAY.
PDF
 Inherited
clip(x:Number, y:Number, width:Number, height:Number):void
PDF
 Inherited
clippedCell(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void
PDF
 Inherited
clippingCircle(x:Number, y:Number, radius:Number, outline:Boolean = false):void
PDF
 Inherited
clippingEllipse(x:Number, y:Number, ty:Number, ry:Number, outline:Boolean = false):void
PDF
 Inherited
clippingPolygon(points:Array, outline:Boolean = false):void
PDF
 Inherited
clippingRect(x:Number, y:Number, width:Number, height:Number, outline:Boolean = false):void
PDF
 Inherited
clippingRoundedRect(x:Number, y:Number, width:Number, height:Number, radius:Number, outline:Boolean = false):void
PDF
 Inherited
clippingText(x:Number, y:Number, text:String, outline:Boolean = false):void
PDF
  
configureDateFormatter(formatString:String):void
Invoice
  
createGrid(data:Array):void
Invoice
 Inherited
curveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, finalX3:Number, finalY3:Number):void
The curveTo method draws a cubic bezier curve.
PDF
 Inherited
dispatchEvent(event:Event):Boolean
PDF
 Inherited
drawCircle(x:Number, y:Number, radius:Number):void
The drawCircle method draws a circle.
PDF
 Inherited
drawEllipse(x:Number, y:Number, radiusX:Number, radiusY:Number):void
The drawEllipse method draws an ellipse.
PDF
 Inherited
drawLine(x1:Number, y1:Number, x2:Number, y2:Number):void
PDF
 Inherited
drawPolygone(points:Array):void
The drawPolygone method draws a polygone.
PDF
 Inherited
drawRect(rect:Rectangle):void
The drawRect method draws a rectangle shape.
PDF
 Inherited
drawRoundRect(rect:Rectangle, ellipseWidth:Number):void
The drawRoundedRect method draws a rounded rectangle shape.
PDF
 Inherited
drawRoundRectComplex(rect:Rectangle, topLeftEllipseWidth:Number, topRightEllipseWidth:Number, bottomLeftEllipseWidth:Number, bottomRightEllipseWidth:Number):void
The drawComplexRoundRect method draws a rounded rectangle shape.
PDF
 Inherited
drawSector(xCenter:Number, yCenter:Number, radius:Number, a:Number, b:Number, style:String = FD, clockWise:Boolean = true, angleOrigin:Number = 90):void
The drawSector method draws a sector, which allows you to draw a pie chart.
PDF
 Inherited
end(closePath:Boolean = true):void
The end method closes the stroke.
PDF
 Inherited
endFill():void
Ends all previous filling.
PDF
 Inherited
footer(footerText:String, showPageNumber:Boolean = false, position:String = left):void
PDF
 Inherited
Returns an InternalLink object linked to the current page at the current Y in the page.
PDF
 Inherited
Lets you retrieve the current Page.
PDF
 Inherited
Returns the default PDF orientation.
PDF
 Inherited
Returns the default PDF Size.
PDF
 Inherited
Returns the default PDF unit unit.
PDF
 Inherited
getFonts():Array
Lets you retrieve the fonts used in the PDF document.
PDF
 Inherited
getMargins():Rectangle
Lets you retrieve the margins dimensions.
PDF
 Inherited
getPage(index:int):Page
Lets you retrieve a Page object.
PDF
 Inherited
getPages():Array
Lets you retrieve all the PDF pages.
PDF
 Inherited
getX():Number
Lets you retrieve the X position for the current page.
PDF
 Inherited
getY():Number
Lets you retrieve the Y position for the current page.
PDF
 Inherited
gotoPage(index:int):void
Lets you move to a Page in the PDF.
PDF
 Inherited
hasEventListener(type:String):Boolean
PDF
 Inherited
header(headerText:String):void
PDF
 Inherited
linearGradient(x:Number, y:Number, width:Number, height:Number, col1:Array, col2:Array, coordinates:Array):void
PDF
 Inherited
lineStyle(color:IColor, 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.
PDF
 Inherited
lineTo(x:Number, y:Number):void
Lets you draw a stroke from the current point to the new point.
PDF
  
maxWidth():Number
Invoice
 Inherited
moveTo(x:Number, y:Number):void
Lets you move the current drawing point to the specified destination.
PDF
 Inherited
newLine(height:*):void
Lets you insert a line break for text.
PDF
 Inherited
radialGradient(x:Number, y:Number, width:Number, height:Number, col1:Array, col2:Array, coordinates:Array):void
PDF
 Inherited
Lets you remove all the pages from the PDF.
PDF
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
PDF
 Inherited
removeFont(font:IFont):void
Lets you remove an embedded font from the PDF.
PDF
 Inherited
removePage(index:int):Page
Lets you remove a Page from the PDF.
PDF
 Inherited
Lets you reset the margins dimensions.
PDF
 Inherited
rotate(angle:Number, x:Number = -1, y:Number = -1):void
Allows you to rotate any content drawn after the rotate() call
PDF
 Inherited
rotatePage(number:int, rotation:Number):void
Lets you rotate a specific page (between 1 and n-1).
PDF
  
RoundedRect(x:Number, y:Number, w:Number, h:Number, r:Number, style:String):void
Invoice
 Inherited
save(method:String, url:String, downloadMethod:String = inline, fileName:String = generated.pdf, frame:String = _blank):*
Allows you to save the PDF locally (Flash Player 10 minmum required) or remotely through a server-side script.
PDF
 Inherited
setAdvanceTiming(timing:int):void
Lets you set specify the timing (in seconds) a page is shown when the PDF is shown in fullscreen mode.
PDF
 Inherited
setAliasNbPages(alias:String = {nb}):void
Lets you specify an alias for the total number of pages.
PDF
 Inherited
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).
PDF
 Inherited
setAuthor(author:String):void
Sets the specified author for the PDF.
PDF
 Inherited
setAutoPageBreak(auto:Boolean, margin:Number):void
Lets you enable or disable auto page break mode and triggering margin.
PDF
 Inherited
setBottomMargin(margin:Number):void
Lets you specify the bottom margin
PDF
 Inherited
setCreator(creator:String):void
Sets the specified creator for the PDF.
PDF
 Inherited
setDisplayMode(zoom:String = FullWidth, layout:String = SinglePage, mode:String = UseNone, zoomValue:Number = 1):void
Lets you set a specific display mode, the DisplayMode takes care of the general layout of the PDF in the PDF reader
PDF
 Inherited
setFont(font:IFont, size:int = 12, underlined:Boolean = false):void
Lets you set a specific font.
PDF
 Inherited
setFontSize(size:int):void
Lets you set a new size for the current font.
PDF
 Inherited
setGridPositionOnNextPages(xvalue:Number = 10, yvalue:Number = 10):void
This method is used to add grid when used in auto mode for big chunck of data into other pages.
PDF
 Inherited
setKeywords(keywords:String):void
Sets the specified keywords for the PDF.
PDF
 Inherited
setLeftMargin(margin:Number):void
Lets you specify the left margin.
PDF
 Inherited
setMargins(left:Number, top:Number, right:Number = -1, bottom:Number = 20):void
Lets you specify the left, top, and right margins.
PDF
 Inherited
setRightMargin(margin:Number):void
Lets you specify the right margin.
PDF
 Inherited
setStartingPage(index:int):void
Lets you specify which page should be viewed by default when the document is opened.
PDF
 Inherited
setSubject(subject:String):void
Lets you set a subject for the PDF.
PDF
 Inherited
setTitle(title:String):void
Lets you set a title for the PDF.
PDF
 Inherited
setTopMargin(margin:Number):void
Lets you specify the top margin.
PDF
 Inherited
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.
PDF
 Inherited
setVisible(visible:String):void
PDF
 Inherited
setX(x:Number):void
Lets you specify the X position for the current page.
PDF
 Inherited
setXY(x:Number, y:Number):void
Lets you specify the X and Y position for the current page.
PDF
 Inherited
setY(y:Number):void
Lets you specify the Y position for the current page.
PDF
  
SizeOfText(texte:String, largeur:Number):Number
Returns the number of lines to display properly this text in the specific width
Invoice
 Inherited
skew(ax:Number, ay:Number, x:Number = -1, y:Number = -1):void
Allows you to skew any content drawn after the skew() call
PDF
 Inherited
textStyle(color:IColor, alpha:Number = 1, rendering:int = 0, wordSpace:Number = 0, characterSpace:Number = 0, scale:Number = 100, leading:Number = 0):void
Sets the text style with an appropriate color, alpha etc.
PDF
 Inherited
toString():String
PDF
 Inherited
PDF
 Inherited
willTrigger(type:String):Boolean
PDF
 Inherited
writeFlashHtmlText(pHeight:Number, pText:String, pLink:ILink = null):void
Lets you write some text with basic HTML type formatting.
PDF
 Inherited
writeText(lineHeight:Number, text:String, link:ILink = null):void
Lets you write some text in the current page.
PDF
Events
 Event Summary Defined By
 InheritedDispatched when a page has been added to the PDF.PDF
 InheritedDispatched when PDF has been generated and available.PDF
 InheritedDispatched when the PDF page tree has been generated.PDF
 InheritedDispatched when the required resources (fonts, images, etc.) haven been written into the PDF.PDF
 InheritedDispatched when the PDF generation has been initiated.PDF
Property Detail
dataExproperty
public static var dataEx:Array

Constructor Detail
Invoice()Constructor
public function Invoice(orientation:String = Portrait, unit:String = Mm, autoPageBreak:Boolean = true, pageSize:Size = null, rotation:int = 0)



Parameters
orientation:String (default = Portrait)
 
unit:String (default = Mm)
 
autoPageBreak:Boolean (default = true)
 
pageSize:Size (default = null)
 
rotation:int (default = 0)
Method Detail
addCadreTVAs()method
public function addCadreTVAs():void

addClientAddress()method 
public function addClientAddress(company:Company):void

Parameters

company:Company

addCompany()method 
public function addCompany(company:Company):void

Parameters

company:Company

addCompanyBox()method 
public function addCompanyBox(company:Company, y:Number, align:String = L):void

Parameters

company:Company
 
y:Number
 
align:String (default = L)

addDate()method 
public function addDate(date:Object):void

Parameters

date:Object

addEcheance()method 
public function addEcheance(date:Object):void

Parameters

date:Object

addReglement()method 
public function addReglement(mode:String):void

Parameters

mode:String

addRemarque()method 
public function addRemarque(remarque:String):void

Parameters

remarque:String

configureDateFormatter()method 
public function configureDateFormatter(formatString:String):void

Parameters

formatString:String

createGrid()method 
public function createGrid(data:Array):void

Parameters

data:Array

maxWidth()method 
public function maxWidth():Number

Returns
Number
RoundedRect()method 
public function RoundedRect(x:Number, y:Number, w:Number, h:Number, r:Number, style:String):void

Parameters

x:Number
 
y:Number
 
w:Number
 
h:Number
 
r:Number
 
style:String

SizeOfText()method 
public function SizeOfText(texte:String, largeur:Number):Number

Returns the number of lines to display properly this text in the specific width

Parameters

texte:String — String The text on which the calcul is done
 
largeur:Number — String The specific width where the text will be displayed

Returns
Number — Number Number of lines