/frameworks/projects/playerglobal/bundles/en_US/docs/flash.printing.xml
XML | 1258 lines | 1013 code | 227 blank | 18 comment | 0 complexity | 89fadc61a69bbdfa12210c09c339a599 MD5 | raw file
Possible License(s): Apache-2.0
Large files files are truncated, but you can click here to view the full file
- <?xml version="1.0" encoding="UTF-8"?><apiPackage xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" id="flash.printing" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiPackage/apiPackage "><apiName class="- topic/title reference/title apiRef/apiName ">flash.printing</apiName><apiDetail class="- topic/body reference/refbody apiRef/apiDetail "/><apiClassifier languages="" id="flash.printing:PrintUIOptions" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">PrintUIOptions</apiName><shortdesc class="- topic/shortdesc ">
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- The PrintUIOptions class is used to specify options for print dialogs that are displayed to the
- user.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The PrintUIOptions class is used to specify options for print dialogs that are displayed to the
- user. Create a PrintUIOptions instance, set its properties, and pass it as the
- <codeph class="+ topic/ph pr-d/codeph ">uiOptions</codeph> parameter of the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.showPageSetupDialog()</codeph>
- or <codeph class="+ topic/ph pr-d/codeph ">PrintJob.start2()</codeph> method.
-
- <p class="- topic/p ">For example, the following code uses a PrintUIOptions instance to specify the
- min and max page numbers when the Page Setup dialog is displayed:</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">import flash.printing.PrintJob;
-
- var myPrintJob:PrintJob = new PrintJob();
- if (myPrintJob.supportsPageSetupDialog)
- {
- var uiOpt:PrintUIOptions = new PrintUIOptions();
- uiOpt.minPage = 1;
- uiOpt.maxPage = 3;
- myPrintJob.showPageSetupDialog(uiOpt);
- }</codeblock>
-
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJob" class="- topic/link "><linktext class="- topic/linktext ">PrintJob</linktext></link><link href="flash.printing.xml#PrintJob/showPageSetupDialog()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.showPageSetupDialog()</linktext></link><link href="flash.printing.xml#PrintJob/start2()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.start2()</linktext></link></related-links><apiConstructor id="flash.printing:PrintUIOptions:PrintUIOptions" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">PrintUIOptions</apiName><shortdesc class="- topic/shortdesc ">
- Creates a new PrintUIOptions object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a new PrintUIOptions object. You pass this object to the
- <codeph class="+ topic/ph pr-d/codeph ">uiOptions</codeph> parameter of the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.showPageSetupDialog()</codeph>
- or <codeph class="+ topic/ph pr-d/codeph ">PrintJob.start2()</codeph> method.
-
- </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJob/showPageSetupDialog()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.showPageSetupDialog()</linktext></link><link href="flash.printing.xml#PrintJob/start2()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.start2()</linktext></link></related-links></apiConstructor><apiValue id="flash.printing:PrintUIOptions:disablePageRange" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">disablePageRange</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether the page range in the print dialog is disabled (true) or
- the user can edit it (false).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier><apiDefaultValue>false
-
- </apiDefaultValue></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether the page range in the print dialog is disabled (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>) or
- the user can edit it (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>). The default value is <codeph class="+ topic/ph pr-d/codeph ">false</codeph>,
- indicating that there is no restriction on editing the page range.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.printing:PrintUIOptions:maxPage" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">maxPage</apiName><shortdesc class="- topic/shortdesc ">
- The maxiumum page number the user can enter
- in the print dialog.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">0</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">uint</apiValueClassifier><apiDefaultValue>0
-
- </apiDefaultValue></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The maxiumum page number the user can enter
- in the print dialog. The default value is 0, indicating that there is
- no restriction on the maximum page number.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.printing:PrintUIOptions:minPage" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">minPage</apiName><shortdesc class="- topic/shortdesc ">
- The minimum page number a user can enter
- in the print dialog.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">0</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">uint</apiValueClassifier><apiDefaultValue>0
-
- </apiDefaultValue></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The minimum page number a user can enter
- in the print dialog. The default value is 0, indicating that there is
- no restriction on the minimum page number.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.printing:PrintMethod" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">PrintMethod</apiName><shortdesc class="- topic/shortdesc ">
- This class provides values for the PrintJobOptions.printMethod property
- to specify the method of printing a page.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- This class provides values for the <codeph class="+ topic/ph pr-d/codeph ">PrintJobOptions.printMethod</codeph> property
- to specify the method of printing a page.
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printMethod</linktext></link></related-links><apiValue id="flash.printing:PrintMethod:AUTO" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">AUTO</apiName><shortdesc class="- topic/shortdesc ">
- Automatic selection of the best method of printing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">printMethod.auto, auto
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">auto</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Automatic selection of the best method of printing. This value indicates
- that vector or bitmap printing is chosen automatically, based on
- the content to print. Vector printing is used whenever the content
- can be faithfully reproduced by that method. If transparency or certain
- other effects are present, bitmap printing is used instead.
-
- <p class="- topic/p ">This constant is used with the <codeph class="+ topic/ph pr-d/codeph ">PrintJobOptions.printMethod</codeph> property.
- Use the syntax <codeph class="+ topic/ph pr-d/codeph ">PrintMethod.AUTO</codeph>.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printMethod</linktext></link><link href="flash.printing.xml#PrintMethod/VECTOR" class="- topic/link "><linktext class="- topic/linktext ">VECTOR</linktext></link><link href="flash.printing.xml#PrintMethod/BITMAP" class="- topic/link "><linktext class="- topic/linktext ">BITMAP</linktext></link></related-links></apiValue><apiValue id="flash.printing:PrintMethod:BITMAP" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">BITMAP</apiName><shortdesc class="- topic/shortdesc ">
- The bitmap method of printing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">printMethod.bitmap, bitmap
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">bitmap</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The bitmap method of printing.
-
- <p class="- topic/p ">This constant is used with the <codeph class="+ topic/ph pr-d/codeph ">PrintJobOptions.printMethod</codeph> property.
- Use the syntax <codeph class="+ topic/ph pr-d/codeph ">PrintMethod.BITMAP</codeph>.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printMethod</linktext></link><link href="flash.printing.xml#PrintMethod/VECTOR" class="- topic/link "><linktext class="- topic/linktext ">VECTOR</linktext></link><link href="flash.printing.xml#PrintMethod/AUTO" class="- topic/link "><linktext class="- topic/linktext ">AUTO</linktext></link></related-links></apiValue><apiValue id="flash.printing:PrintMethod:VECTOR" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">VECTOR</apiName><shortdesc class="- topic/shortdesc ">
- The vector method of printing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">printMethod.vector, vector
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">vector</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The vector method of printing.
-
- <p class="- topic/p ">This constant is used with the <codeph class="+ topic/ph pr-d/codeph ">PrintJobOptions.printMethod</codeph> property.
- Use the syntax <codeph class="+ topic/ph pr-d/codeph ">PrintMethod.VECTOR</codeph>.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printMethod</linktext></link><link href="flash.printing.xml#PrintMethod/BITMAP" class="- topic/link "><linktext class="- topic/linktext ">BITMAP</linktext></link><link href="flash.printing.xml#PrintMethod/AUTO" class="- topic/link "><linktext class="- topic/linktext ">AUTO</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.printing:PrintJobOptions" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">PrintJobOptions</apiName><shortdesc class="- topic/shortdesc ">
- The PrintJobOptions class contains properties to use with the
- options parameter of the PrintJob.addPage() method.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The PrintJobOptions class contains properties to use with the
- <codeph class="+ topic/ph pr-d/codeph ">options</codeph> parameter of the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> method.
- For more information about <codeph class="+ topic/ph pr-d/codeph ">addPage()</codeph>, see the PrintJob class.
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJob" class="- topic/link "><linktext class="- topic/linktext ">PrintJob</linktext></link><link href="flash.printing.xml#PrintJob/addPage()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.addPage()</linktext></link></related-links><apiConstructor id="flash.printing:PrintJobOptions:PrintJobOptions" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">PrintJobOptions</apiName><shortdesc class="- topic/shortdesc ">
- Creates a new PrintJobOptions object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">printAsBitmap</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, this object is printed as a bitmap.
- If <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, this object is printed as a vector.
-
- <p class="- topic/p ">If the content that you're printing includes a bitmap image,
- set the <codeph class="+ topic/ph pr-d/codeph ">printAsBitmap</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> to include any
- alpha transparency and color effects.
- If the content does not include bitmap images, omit this parameter to print
- the content in higher quality vector format (the default option).</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">Note:</i>Adobe AIR does not support vector printing on Mac OS.</p>
-
- </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a new PrintJobOptions object. Pass this object
- to the <codeph class="+ topic/ph pr-d/codeph ">options</codeph> parameter of the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> method.
-
- </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJob/addPage()" class="- topic/link "><linktext class="- topic/linktext ">PrintJob.addPage()</linktext></link></related-links></apiConstructor><apiValue id="flash.printing:PrintJobOptions:pixelsPerInch" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">pixelsPerInch</apiName><shortdesc class="- topic/shortdesc ">
- Specifies the resolution to use for bitmaps, in pixels per inch.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">NaN</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies the resolution to use for bitmaps, in pixels per inch.
- The default value is <codeph class="+ topic/ph pr-d/codeph ">Number.NaN</codeph>, indicating that the native
- printer resolution is used.
-
- <p class="- topic/p ">The resolution setting is for both bitmap and vector printing. For bitmap printing,
- resolution controls how the entire page is rasterized. For vector printing, resolution
- controls how specific content, such as bitmaps and gradients, is rasterized.</p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.printing:PrintJobOptions:printAsBitmap" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">printAsBitmap</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether the content in the print job is printed as a bitmap or as a vector.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether the content in the print job is printed as a bitmap or as a vector.
- The default value is <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, for vector printing.
-
- <p class="- topic/p ">If the content that you're printing includes a bitmap image,
- set <codeph class="+ topic/ph pr-d/codeph ">printAsBitmap</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> to include any
- alpha transparency and color effects.
- If the content does not include bitmap images, print
- the content in higher quality vector format (the default option).</p>
- <p class="- topic/p ">For example, to print your content as a bitmap, use the following syntax:</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- var options:PrintJobOptions = new PrintJobOptions();
- options.printAsBitmap = true;
- myPrintJob.addPage(mySprite, null, options);
- </codeblock>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">Note:</i>Adobe AIR does not support vector printing on Mac OS.</p>
-
- </apiDesc><example conref="examples\printAsBitmapExample.as" class="- topic/example "> The following example first loads a picture and puts it in a rectangle frame, then print the picture as a bitmap.
-
- <ol class="- topic/ol "><li class="- topic/li ">The constructor loads the picture (<codeph class="+ topic/ph pr-d/codeph ">image.jpg</codeph>) using the <codeph class="+ topic/ph pr-d/codeph ">Loader</codeph> and <codeph class="+ topic/ph pr-d/codeph ">URLRequest</codeph> objects.
- It also checks if an error occurred during loading. Here the file is assumed to be in the same directory as the SWF file.
- The SWF file needs to be compiled with Local Playback Secuirty set to Access Local Files Only.</li><li class="- topic/li ">When the picture is loaded (the event is complete), the <codeph class="+ topic/ph pr-d/codeph ">completeHandler()</codeph> method is called.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">completeHandler()</codeph> method, creates a <codeph class="+ topic/ph pr-d/codeph ">BitmapData</codeph> object, and loads the picture (bitmap) in it.
- A rectangle is drawn in the <codeph class="+ topic/ph pr-d/codeph ">Sprite</codeph> object (<codeph class="+ topic/ph pr-d/codeph ">frame</codeph>) and the <codeph class="+ topic/ph pr-d/codeph ">beginBitmapFill()</codeph> method is used
- to fill the rectangle with the picture (a <codeph class="+ topic/ph pr-d/codeph ">BitmapData</codeph> object). A <codeph class="+ topic/ph pr-d/codeph ">Matrix</codeph> object also is used to scale the
- image to fit the rectangle. (Note that this will distort the image. It is used in this example to make sure the image fits.)
- Once the image is filled, the <codeph class="+ topic/ph pr-d/codeph ">printPage()</codeph> method is called.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">printPage()</codeph> method creates a new instance of the print job and starts the printing process, which invokes the
- print dialog box for the user, and populates the properties of the print job. The <codeph class="+ topic/ph pr-d/codeph ">addPage()</codeph> method contains the
- details about the print job. Here, the frame with the picture (a Sprite object) is set to print as a bitmap and not
- as a vector. <codeph class="+ topic/ph pr-d/codeph ">options</codeph> is an instance of <codeph class="+ topic/ph pr-d/codeph ">PrintJobOptions</codeph> class and its property <codeph class="+ topic/ph pr-d/codeph ">printAsBitmap</codeph>
- is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> in order to print as a bitmap (default setting is false).</li></ol>
- <p class="- topic/p ">Note: There is very limited error handling defined for this example.</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.display.Loader;
- import flash.display.Bitmap;
- import flash.display.BitmapData;
- import flash.printing.PrintJob;
- import flash.printing.PrintJobOptions;
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- import flash.net.URLRequest;
- import flash.geom.Matrix;
- public class printAsBitmapExample extends Sprite {
- private var frame:Sprite = new Sprite();
- private var url:String = "image.jpg";
- private var loader:Loader = new Loader();
- public function printAsBitmapExample() {
- var request:URLRequest = new URLRequest(url);
-
- loader.load(request);
- loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
- loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
- }
- private function completeHandler(event:Event):void {
-
- var picture:Bitmap = Bitmap(loader.content);
- var bitmap:BitmapData = picture.bitmapData;
- var matrix:Matrix = new Matrix();
- matrix.scale((200 / bitmap.width), (200 / bitmap.height));
-
- frame.graphics.lineStyle(10);
- frame.graphics.beginBitmapFill(bitmap, matrix, true);
- frame.graphics.drawRect(0, 0, 200, 200);
- frame.graphics.endFill();
- addChild(frame);
-
- printPage();
- }
- private function ioErrorHandler(event:IOErrorEvent):void {
- trace("Unable to load the image: " + url);
- }
- private function printPage ():void {
- var myPrintJob:PrintJob = new PrintJob();
- var options:PrintJobOptions = new PrintJobOptions();
- options.printAsBitmap = true;
-
- myPrintJob.start();
-
- try {
- myPrintJob.addPage(frame, null, options);
- }
- catch(e:Error) {
- trace ("Had problem adding the page to print job: " + e);
- }
-
- try {
- myPrintJob.send();
- }
- catch (e:Error) {
- trace ("Had problem printing: " + e);
- }
- }
- }
- }
- </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printMethod</linktext></link></related-links></apiValue><apiValue id="flash.printing:PrintJobOptions:printMethod:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">printMethod</apiName><shortdesc class="- topic/shortdesc ">
- Specifies that the Flash runtime chooses the most appropriate
- printing method, or that the author wishes to explicitly select
- vector or bitmap printing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The <codeph class="+ topic/ph pr-d/codeph ">printMethod</codeph> specified is not one of the
- values defined in the <codeph class="+ topic/ph pr-d/codeph ">PrintMethod</codeph> class.
-
- </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies that the Flash runtime chooses the most appropriate
- printing method, or that the author wishes to explicitly select
- vector or bitmap printing.
-
- <p class="- topic/p ">Set the property to one of the following values defined in the
- <codeph class="+ topic/ph pr-d/codeph ">PrintMethod</codeph> class:</p>
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">PrintMethod.AUTO</codeph>: Specifies that vector or bitmap printing
- is chosen automatically, based on the content to be printed. Vector
- printing will be used whenever the content can be faithfully reproduced by
- that method. If transparency or certain other effects are present, bitmap
- printing will be used instead.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">PrintMethod.VECTOR</codeph>: Speifies vector printing.
- This setting is the same as setting <codeph class="+ topic/ph pr-d/codeph ">printAsBitmap</codeph> to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">PrintMethod.BITMAP</codeph>: Specifies bitmap printing.
- Same as setting <codeph class="+ topic/ph pr-d/codeph ">printAsBitmap</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</li></ul>
-
- <p class="- topic/p ">If printMethod is set to one of these supported values, then printAsBitmap
- is ignored.</p>
-
- <p class="- topic/p ">The default value is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>; the printAsBitmap property is
- used.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.printing.xml#PrintJobOptions/printAsBitmap" class="- topic/link "><linktext class="- topic/linktext ">PrintJobOptions.printAsBitmap</linktext></link><link href="flash.printing.xml#PrintMethod" class="- topic/link "><linktext class="- topic/linktext ">PrintMethod class</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.printing:PrintJob" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">PrintJob</apiName><shortdesc class="- topic/shortdesc ">
- The PrintJob class lets you create content and print it to one or
- more pages.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">printjob, print
- </keyword></asCustoms></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The PrintJob class lets you create content and print it to one or
- more pages. This class
- lets you render content that is visible, dynamic or offscreen to the user, prompt users with a
- single Print dialog box, and print an unscaled document with
- proportions that map to the proportions of the content. This
- capability is especially useful for rendering and printing dynamic
- content, such as database content and dynamic text.
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Mobile Browser Support:</b> This class is not supported in mobile browsers.</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
- on all desktop operating systems, but it is not supported on mobile devices or AIR for TV devices. You can test
- for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.isSupported</codeph> property. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
-
- <p class="- topic/p ">Use the <codeph class="+ topic/ph pr-d/codeph ">PrintJob()</codeph> constructor to create a print job.</p>
-
- <p class="- topic/p ">Additionally, with the PrintJob class's properties, you can read your user's
- printer settings, such as page height, width, and image orientation, and
- you can configure your document to dynamically format Flash content
- that is appropriate for the printer settings.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> ActionScript 3.0 does not restrict a PrintJob object
- to a single frame (as did previous versions of ActionScript). However, since
- the operating system displays print status information to the user after the
- user has clicked the OK button in the Print dialog box, you should call
- <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">PrintJob.send()</codeph> as soon as
- possible to send pages to the spooler. A delay reaching the frame containing
- the <codeph class="+ topic/ph pr-d/codeph ">PrintJob.send()</codeph> call delays the printing process.</p>
- <p class="- topic/p ">Additionally, a 15 second script timeout limit applies to the following intervals:</p>
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">PrintJob.start()</codeph> and the first <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> and the next <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph></li><li class="- topic/li ">The last <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">PrintJob.send()</codeph></li></ul>
-
- <p class="- topic/p ">If any of the above intervals span more than 15 seconds, the next call to
- <codeph class="+ topic/ph pr-d/codeph ">PrintJob.start()</codeph> on the PrintJob instance returns <codeph class="+ topic/ph pr-d/codeph ">false</codeph>,
- and the next <codeph class="+ topic/ph pr-d/codeph ">PrintJob.addPage()</codeph> on the PrintJob instance causes
- the Flash Player or Adobe AIR to throw a runtime exception.</p>
-
- </apiDesc><example conref="examples\PrintJobExample_Simple.as" class="- topic/example "> The following example show the basics of printing. A new PrintJob is created,
- and if started successfully, the <codeph class="+ topic/ph pr-d/codeph ">addPage()</codeph> method adds the sprite as a single page.
- The <codeph class="+ topic/ph pr-d/codeph ">send()</codeph> method spools the page to the printer.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package
- {
- import flash.printing.PrintJob;
- import flash.display.Sprite;
-
- public class BasicPrintExample extends Sprite
- {
- var myPrintJob:PrintJob = new PrintJob();
- var mySprite:Sprite = new Sprite();
- mySprite.graphics.beginFill(0x336699);
- mySprite.graphics.drawCircle(100, 100, 50);
-
- public function BasicPrintExample()
- {
- if (myPrintJob.start()) {
- try {
- myPrintJob.addPage(mySprite);
- }
- catch(e:Error) {
- // handle error
- }
- myPrintJob.send();
- }
- }
- }
- </codeblock></example><example conref="examples\PrintJobExample.as" class="- topic/example "> The following example uses the class <codeph class="+ topic/ph pr-d/codeph ">PrintJobExample</codeph> to create a small document and
- then send the document to the printer. This is accomplished using the following steps:
- <ol class="- topic/ol "><li class="- topic/li ">Declare two variables of type Sprite named <codeph class="+ topic/ph pr-d/codeph ">sheet1</codeph> and <codeph class="+ topic/ph pr-d/codeph ">sheet2</codeph>.</li><li class="- topic/li ">Call <codeph class="+ topic/ph pr-d/codeph ">init()</codeph>, which assigns a new Sprite instance to both <codeph class="+ topic/ph pr-d/codeph ">sheet1</codeph> and
- <codeph class="+ topic/ph pr-d/codeph ">sheet2</codeph> and then calls <codeph class="+ topic/ph pr-d/codeph ">createSheet()</codeph> using different arguments.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">createSheet()</codeph> does the following:
- <ol outputclass="A" class="- topic/ol "><li class="- topic/li ">The Sprite object passed in is used to draw a rectangle with a light-gray background, a
- one-pixel black border, and that is 100 pixels wide by 200 pixels high at x = 0, y = 0.</li><li class="- topic/li ">A new TextField object is created named <codeph class="+ topic/ph pr-d/codeph ">txt</codeph> with the same dimensions as
- the Sprite, the wordWrap property set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, and the text property set to
- the String passed as an argument to <codeph class="+ topic/ph pr-d/codeph ">createSheet()</codeph>.</li><li class="- topic/li ">If the Object argument passed is not null, create a new Sprite instance named
- <codeph class="+ topic/ph pr-d/codeph ">img</codeph> that is used to draw a white rectangle using the coordinate and dimension properties
- of the Object passed. The white rectangle is added to the display list of the Sprite object using
- <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph>.</li><li class="- topic/li ">The <codeph…
Large files files are truncated, but you can click here to view the full file