| Property | Defined By | ||
|---|---|---|---|
| isUnicode : Boolean
Getter/Setter for _cidFont
| UnicodePDF | ||
![]() | totalFonts : int [read-only]
Lets you retrieve the total number of fonts used in the PDF document. | ||
![]() | totalPages : int [read-only]
Lets you retrieve the number of pages in the PDF document. | ||
| Property | Defined By | ||
|---|---|---|---|
| _cache_maxsize_UTF8StringToArray : Number = 100 [static] Gestion CID Font unicode
| UnicodePDF | ||
| _cache_size_UTF8StringToArray : Number = 0 | UnicodePDF | ||
| _cache_UTF8StringToArray : Object | UnicodePDF | ||
| _cache_UTF8StringToArrayKeys : Array | UnicodePDF | ||
| Method | Defined By | ||
|---|---|---|---|
UnicodePDF(orientation:String = Portrait, unit:String = Mm, autoPageBreak:Boolean = true, pageSize:Size = null, rotation:int = 0) | UnicodePDF | ||
![]() | addAnnotation(annotation:Annotation):void
Lets you add an annotation to the current page
| ||
![]() | addBookmark(text:String, level:int = 0, y:Number = -1, color:RGBColor = null):void
Lets you add a bookmark. | ||
![]() | 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. | ||
![]() | 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
| ||
![]() | 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
| ||
![]() | 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
| ||
![]() | 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
| ||
![]() | addCodaBar(codaBar:CodaBar):void
Allows you to add a CodaBar (Monarch) to the current page at any position. | ||
![]() | 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. | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | ||
![]() |
Adds a dynamic table to the current page. | ||
![]() | 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. | ||
![]() | 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. | ||
![]() | addJavaScript(script:String):void
The addJavaScript allows you to inject JavaScript code to be executed when the PDF document is opened. | ||
![]() |
Lets you add clickable link to a specific position
Link can be internal (document level navigation) or external (HTTP). | ||
![]() | 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. | ||
![]() |
Lets you add a page to the current PDF. | ||
![]() | addText(text:String, x:Number = 0, y:Number = 0):void
Lets you set some text to any position on the page. | ||
![]() | 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. | ||
![]() | beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null):void
The beginBitmapFill method fills a surface with a bitmap as a texture. | ||
![]() |
Sets the filling color for different color spaces CMYK, RGB or DEVICEGRAY. | ||
![]() | clip(x:Number, y:Number, width:Number, height:Number):void | ||
![]() | clippedCell(width:Number, height:Number = 0, text:String, border:* = 0, ln:Number = 0, align:String, fill:Number = 0, link:ILink = null):void | ||
![]() | clippingCircle(x:Number, y:Number, radius:Number, outline:Boolean = false):void | ||
![]() | clippingEllipse(x:Number, y:Number, ty:Number, ry:Number, outline:Boolean = false):void | ||
![]() | clippingPolygon(points:Array, outline:Boolean = false):void | ||
![]() | clippingRect(x:Number, y:Number, width:Number, height:Number, outline:Boolean = false):void | ||
![]() | clippingRoundedRect(x:Number, y:Number, width:Number, height:Number, radius:Number, outline:Boolean = false):void | ||
![]() | clippingText(x:Number, y:Number, text:String, outline:Boolean = false):void | ||
![]() | curveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, finalX3:Number, finalY3:Number):void
The curveTo method draws a cubic bezier curve. | ||
![]() | dispatchEvent(event:Event):Boolean | ||
![]() | drawCircle(x:Number, y:Number, radius:Number):void
The drawCircle method draws a circle. | ||
![]() | drawEllipse(x:Number, y:Number, radiusX:Number, radiusY:Number):void
The drawEllipse method draws an ellipse. | ||
![]() | drawLine(x1:Number, y1:Number, x2:Number, y2:Number):void | ||
![]() | drawPolygone(points:Array):void
The drawPolygone method draws a polygone. | ||
![]() | drawRect(rect:Rectangle):void
The drawRect method draws a rectangle shape. | ||
![]() | drawRoundRect(rect:Rectangle, ellipseWidth:Number):void
The drawRoundedRect method draws a rounded rectangle shape. | ||
![]() | drawRoundRectComplex(rect:Rectangle, topLeftEllipseWidth:Number, topRightEllipseWidth:Number, bottomLeftEllipseWidth:Number, bottomRightEllipseWidth:Number):void
The drawComplexRoundRect method draws a rounded rectangle shape. | ||
![]() | 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. | ||
![]() | end(closePath:Boolean = true):void
The end method closes the stroke. | ||
![]() | endFill():void
Ends all previous filling. | ||
![]() | footer(footerText:String, showPageNumber:Boolean = false, position:String = left):void | ||
![]() |
Returns an InternalLink object linked to the current page at the current Y in the page. | ||
![]() |
Lets you retrieve the current Page. | ||
![]() | getDefaultOrientation():String
Returns the default PDF orientation. | ||
![]() |
Returns the default PDF Size. | ||
![]() | getDefaultUnit():String
Returns the default PDF unit unit. | ||
![]() | getFonts():Array
Lets you retrieve the fonts used in the PDF document. | ||
![]() | getMargins():Rectangle
Lets you retrieve the margins dimensions. | ||
![]() |
Lets you retrieve a Page object. | ||
![]() | getPages():Array
Lets you retrieve all the PDF pages. | ||
![]() | getX():Number
Lets you retrieve the X position for the current page. | ||
![]() | getY():Number
Lets you retrieve the Y position for the current page. | ||
![]() | gotoPage(index:int):void
Lets you move to a Page in the PDF. | ||
![]() | hasEventListener(type:String):Boolean | ||
![]() | header(headerText:String):void | ||
![]() | linearGradient(x:Number, y:Number, width:Number, height:Number, col1:Array, col2:Array, coordinates:Array):void | ||
![]() | 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. | ||
![]() | lineTo(x:Number, y:Number):void
Lets you draw a stroke from the current point to the new point. | ||
![]() | moveTo(x:Number, y:Number):void
Lets you move the current drawing point to the specified destination. | ||
![]() | newLine(height:*):void
Lets you insert a line break for text. | ||
![]() | radialGradient(x:Number, y:Number, width:Number, height:Number, col1:Array, col2:Array, coordinates:Array):void | ||
![]() | removeAllPages():void
Lets you remove all the pages from the PDF. | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void | ||
![]() | removeFont(font:IFont):void
Lets you remove an embedded font from the PDF. | ||
![]() | removePage(index:int):Page
Lets you remove a Page from the PDF. | ||
![]() | resetMargins():void
Lets you reset the margins dimensions. | ||
![]() | rotate(angle:Number, x:Number = -1, y:Number = -1):void
Allows you to rotate any content drawn after the rotate() call
| ||
![]() | rotatePage(number:int, rotation:Number):void
Lets you rotate a specific page (between 1 and n-1). | ||
![]() | 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. | ||
![]() | setAdvanceTiming(timing:int):void
Lets you set specify the timing (in seconds) a page is shown when the PDF is shown in fullscreen mode. | ||
![]() | setAliasNbPages(alias:String = {nb}):void
Lets you specify an alias for the total number of pages. | ||
![]() | 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). | ||
![]() | setAuthor(author:String):void
Sets the specified author for the PDF. | ||
![]() | setAutoPageBreak(auto:Boolean, margin:Number):void
Lets you enable or disable auto page break mode and triggering margin. | ||
![]() | setBottomMargin(margin:Number):void
Lets you specify the bottom margin
| ||
![]() | setCreator(creator:String):void
Sets the specified creator for the PDF. | ||
![]() | 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
| ||
![]() |
Lets you set a specific font. | ||
![]() | setFontSize(size:int):void
Lets you set a new size for the current font. | ||
![]() | 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. | ||
![]() | setKeywords(keywords:String):void
Sets the specified keywords for the PDF. | ||
![]() | setLeftMargin(margin:Number):void
Lets you specify the left margin. | ||
![]() | setMargins(left:Number, top:Number, right:Number = -1, bottom:Number = 20):void
Lets you specify the left, top, and right margins. | ||
![]() | setRightMargin(margin:Number):void
Lets you specify the right margin. | ||
![]() | setStartingPage(index:int):void
Lets you specify which page should be viewed by default when the document is opened. | ||
![]() | setSubject(subject:String):void
Lets you set a subject for the PDF. | ||
![]() | setTitle(title:String):void
Lets you set a title for the PDF. | ||
![]() | setTopMargin(margin:Number):void
Lets you specify the top margin. | ||
![]() | 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. | ||
![]() | setVisible(visible:String):void | ||
![]() | setX(x:Number):void
Lets you specify the X position for the current page. | ||
![]() | setXY(x:Number, y:Number):void
Lets you specify the X and Y position for the current page. | ||
![]() | setY(y:Number):void
Lets you specify the Y position for the current page. | ||
![]() | skew(ax:Number, ay:Number, x:Number = -1, y:Number = -1):void
Allows you to skew any content drawn after the skew() call
| ||
![]() | 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. | ||
![]() | toString():String | ||
![]() | unsetClipping():void | ||
![]() | willTrigger(type:String):Boolean | ||
writeFlashHtmlText(pHeight:Number, pText:String, pLink:ILink = null):void [override] | UnicodePDF | ||
![]() |
Lets you write some text in the current page. | ||
| Method | Defined By | ||
|---|---|---|---|
_putfontwidths(cidFont:ICidFont, cidoffset:int = 0):void
Outputs font widths
| UnicodePDF | ||
[override] | UnicodePDF | ||
arrUTF8ToUTF16BE(unicode:Array, setbom:Boolean = false):String
Converts array of UTF-8 characters to UTF16-BE string.
Based on: http://www.faqs.org/rfcs/rfc2781.html
Encoding UTF-16:
Encoding of a single character from an ISO 10646 character value to
UTF-16 proceeds as follows. | UnicodePDF | ||
countUniqueValues(arr:Array):Number | UnicodePDF | ||
escapeIt(content:String):String [override] | UnicodePDF | ||
fromCharCode(code:uint):String | UnicodePDF | ||
implode(arr:Array, sep:String = ):String | UnicodePDF | ||
insertFonts():void [override] | UnicodePDF | ||
putcidfont0(cdiFont:ICidFont):void
Output CID-0 fonts. | UnicodePDF | ||
UTF8StringToArray(str:String, strBytes:ByteArray):Array
Converts UTF-8 strings to codepoints array.
Invalid byte sequences will be replaced with 0xFFFD (replacement character)
Based on: http://www.faqs.org/rfcs/rfc3629.html
Char. | UnicodePDF | ||
writeStream(stream:String):void [override] | UnicodePDF | ||
| _cache_maxsize_UTF8StringToArray | property |
protected static var _cache_maxsize_UTF8StringToArray:Number = 100Gestion CID Font unicode
| _cache_size_UTF8StringToArray | property |
protected var _cache_size_UTF8StringToArray:Number = 0| _cache_UTF8StringToArray | property |
protected var _cache_UTF8StringToArray:Object| _cache_UTF8StringToArrayKeys | property |
protected var _cache_UTF8StringToArrayKeys:Array| isUnicode | property |
isUnicode:BooleanGetter/Setter for _cidFont
public function get isUnicode():Boolean public function set isUnicode(value:Boolean):void| UnicodePDF | () | Constructor |
public function UnicodePDF(orientation:String = Portrait, unit:String = Mm, autoPageBreak:Boolean = true, pageSize:Size = null, rotation:int = 0)orientation:String (default = Portrait) | |
unit:String (default = Mm) | |
autoPageBreak:Boolean (default = true) | |
pageSize:Size (default = null) | |
rotation:int (default = 0) |
| _putfontwidths | () | method |
protected function _putfontwidths(cidFont:ICidFont, cidoffset:int = 0):void| Since : | 4.4.000 (2008-12-07) |
Outputs font widths
Parameters
cidFont:ICidFont | |
cidoffset:int (default = 0) |
| addFont | () | method |
| arrUTF8ToUTF16BE | () | method |
protected function arrUTF8ToUTF16BE(unicode:Array, setbom:Boolean = false):String| Since : | 2.1.000 (2008-01-08) |
Converts array of UTF-8 characters to UTF16-BE string. Based on: http://www.faqs.org/rfcs/rfc2781.html
Encoding UTF-16: Encoding of a single character from an ISO 10646 character value to UTF-16 proceeds as follows. Let U be the character number, no greater than 0x10FFFF. 1) If U is less than 0x10000, encode U as a 16-bit unsigned integer and terminate. 2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF, U' must be less than or equal to 0xFFFFF. That is, U' can be represented in 20 bits. 3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and 0xDC00, respectively. These integers each have 10 bits free to encode the character value, for a total of 20 bits. 4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order bits of W1 and the 10 low-order bits of U' to the 10 low-order bits of W2. Terminate. Graphically, steps 2 through 4 look like: U' = yyyyyyyyyyxxxxxxxxxx W1 = 110110yyyyyyyyyy W2 = 110111xxxxxxxxxx
Parameters
unicode:Array — $unicode array containing UTF-8 unicode values
| |
setbom:Boolean (default = false) — $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
|
String — string
|
See also
| countUniqueValues | () | method |
protected function countUniqueValues(arr:Array):NumberParameters
arr:Array |
Number |
| escapeIt | () | method |
override protected function escapeIt(content:String):StringParameters
content:String |
String |
| fromCharCode | () | method |
protected function fromCharCode(code:uint):String
Parameters
code:uint |
String —
|
| implode | () | method |
protected function implode(arr:Array, sep:String = ):StringParameters
arr:Array | |
sep:String (default = ) |
String |
| insertFonts | () | method |
override protected function insertFonts():void| putcidfont0 | () | method |
protected function putcidfont0(cdiFont:ICidFont):void| Since : | 3.2.000 (2008-06-23) |
Output CID-0 fonts.
Parameters
cdiFont:ICidFont — $font font data
|
| UTF8StringToArray | () | method |
protected function UTF8StringToArray(str:String, strBytes:ByteArray):Array| Since : | 1.53.0.TC005 (2005-01-05) |
Converts UTF-8 strings to codepoints array. Invalid byte sequences will be replaced with 0xFFFD (replacement character) Based on: http://www.faqs.org/rfcs/rfc3629.html
Char. number range | UTF-8 octet sequence (hexadecimal) | (binary) --------------------+----------------------------------------------- 0000 0000-0000 007F | 0xxxxxxx 0000 0080-0000 07FF | 110xxxxx 10xxxxxx 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx --------------------------------------------------------------------- ABFN notation: --------------------------------------------------------------------- UTF8-octets = UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = %x00-7F UTF8-2 = %xC2-DF UTF8-tail UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) UTF8-tail = %x80-BF ---------------------------------------------------------------------
Parameters
str:String — $str string to process.
| |
strBytes:ByteArray |
Array — array containing codepoints (UTF-8 characters values)
|
| writeFlashHtmlText | () | method |
override public function writeFlashHtmlText(pHeight:Number, pText:String, pLink:ILink = null):voidParameters
pHeight:Number | |
pText:String | |
pLink:ILink (default = null) |
| writeStream | () | method |
override protected function writeStream(stream:String):voidParameters
stream:String |