Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 Flex 3:关于打印的查询_Actionscript 3_Apache Flex_Printing_Flex3 - Fatal编程技术网

Actionscript 3 Flex 3:关于打印的查询

Actionscript 3 Flex 3:关于打印的查询,actionscript-3,apache-flex,printing,flex3,Actionscript 3,Apache Flex,Printing,Flex3,我创建了一个长达16周的日程安排应用程序。我希望能够使用Flex打印时间表。我创建了一个列出递增日期的测试应用程序。这些日期显然比我电脑的宽度还长。我想让我的打印功能打印跨越几页的日期的整个宽度。。。目前,它只打印屏幕上显示的内容。有没有办法做到这一点 下面是我创建的应用程序。有一些对自定义函数的调用,但它们与当前问题无关: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.a

我创建了一个长达16周的日程安排应用程序。我希望能够使用Flex打印时间表。我创建了一个列出递增日期的测试应用程序。这些日期显然比我电脑的宽度还长。我想让我的打印功能打印跨越几页的日期的整个宽度。。。目前,它只打印屏幕上显示的内容。有没有办法做到这一点

下面是我创建的应用程序。有一些对自定义函数的调用,但它们与当前问题无关:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();">
<mx:Script source="functions/dateFunctions.as" />
<mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.collections.ArrayCollection;
        [Bindable] public var date:Date = new Date;
        public var numDays:Number = 50;
        [Bindable] public var datesAC:ArrayCollection = new ArrayCollection;
        public function init():void
        {
            var tempDate:String = new String;
            for (var i:int = 0; i < numDays; i++)
            {
                tempDate = dateToNumText(rightDate(date.getMonth(), date.getDate() + i, date.getFullYear()));
                datesAC.addItem(tempDate);
            }
        }

        private function printMe() :void 
        {
            var pj:PrintJob = new PrintJob();
            pj.start();

            // setTimeout(function() :void { finishPrinting(pj);}, 1);

            finishPrinting(pj);
        }

        private function finishPrinting(pj:PrintJob): void {
            pj.addPage(this);
            pj.send();
        }
    ]]>
</mx:Script>
<mx:VBox width="100%" height="100%">
    <mx:Button id="print" label="Start Print" click="printMe()" />
    <mx:HorizontalList id="dateList" dataProvider="{datesAC}" width="100%" height="100%" useRollOver="false">
        <mx:itemRenderer>
            <mx:Component>
                <mx:Canvas borderColor="#000000" borderSides="right" borderStyle="solid">
                    <mx:Text text="{data}" textAlign="center" color="#000000" width="100" />
                </mx:Canvas>
            </mx:Component>
        </mx:itemRenderer>
    </mx:HorizontalList>
</mx:VBox>
</mx:Application>

我想您应该使用将日期添加到打印作业。

我想您应该使用将日期添加到打印作业。

您必须自己拆分/分页内容。您可以将每个这样的逻辑拆分页面发送到PrintJob.appPage API,使其成为打印纸。目前,正在发生的是,内容将被删减

您必须自己对内容进行分解/分页。您可以将每个这样的逻辑拆分页面发送到PrintJob.appPage API,使其成为打印纸。目前,正在发生的是,内容将被删减