« back

Multipage Printing: Public Methods

setContent

setContent(content:*, w:uint = 0, h:uint = 0)
  • Required. Content to print. If “w” and “h” are not set, the width and height of the content will be used to calculate the printable area. Use “w” and “h” if, for example, the content to be printed contains some stuff off stage (a mask, starting position of an animated mc or whatever), which will lead to an uncorrect size. Also keep in mind that the content will be temporarily resized to 100% (scaleX=scaleY=1) before it will be printed.

setMargins

setMargins(left:Number, top:Number, right:Number, bottom:Number)
  • Default is 20, 20, 50, 60

setMultiPage

setMultiPage(multipage:Boolean, overlap:uint = 0)
  • Default is true. If false, the content will be resized to fit on a single page.

setPrintAsBitmap

setPrintAsBitmap(value:Boolean)
  • Default is true

setOffset

setOffset(x:Number, y:Number)
  • Default is 0,0. Example: Lets say you want to print out an area of your movie clip that has its upper left corner at x=400, y=300, use setOffest(-400,-300). To adjust the missing width, you can add i again by using addWidth(400).

addWidth

addWidth(value:Number)
  • Default is 0. See “setOffset” for explanation.

setDebug

setDebug(value:Boolean)
  • Default is false. Traces some values and draws numbered blue lines over your content, spaced evenly at 10 pixels. You can use this for finetuning your settings like margins.

doNotPrint

doNotPrint(value:Array)
  • Default is an empty array. Add sprites and movieclips in an array. These will be hidden for printing and made visible again afterwards.
print-public-methods.txt · Last modified: 2011/11/11 18:55 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki