Flex制作的个人简历打印

论坛 期权论坛 脚本     
匿名技术用户   2021-1-4 07:14   11   0
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
horizontalScrollPolicy="off"
verticalScrollPolicy="off">

<mx:Script>
<![CDATA[
import mx.printing.FlexPrintJob;

private function printResume():void
{
var printJob:FlexPrintJob = new FlexPrintJob();
printJob.start();
printJob.addObject(resume);
printJob.send();
}
]]>
</mx:Script>

<mx:Style>
Application
{
paddingLeft: 0;
paddingRight: 0;
paddingTop: 0;
paddingBottom: 0;
verticalGap: 0;
fontSize: 12;
}

.resume
{
backgroundAlpha: 1;
backgroundColor: #FFFFFF;
borderColor: #888888;
borderStyle: solid;
borderThickness: 1;
paddingLeft: 15;
paddingRight: 15;
paddingTop: 15;
paddingBottom: 15;
verticalGap: 0;
}

Grid
{
backgroundAlpha: 1;
backgroundColor: #FFFFFF;
borderColor: #000000;
borderSides: "right bottom";
borderStyle: solid;
borderThickness: 1;
horizontalGap: 0;
verticalGap: 0;
}

GridItem
{
borderColor: #000000;
borderSides: "left top";
borderStyle: solid;
borderThickness: 1;
}

.title
{
fontSize: 24;
textAlign: center;
}

.photo
{
borderColor: #000000;
borderSides: "left top";
borderStyle: solid;
borderThickness: 1;
paddingLeft: 2;
paddingRight: 2;
paddingTop: 2;
paddingBottom: 2;
}

.box
{
verticalGap: 0;
}
</mx:Style>

<mx:ApplicationControlBar width="100%">
<mx:Button label="打印简历" click="printResume()" />

</mx:ApplicationControlBar>
<mx:Canvas width="100%" height="100%">
<mx:VBox id="resume"
x="20" y="20" width="682" height="620" styleName="resume">
<mx:Spacer height="12" />
<mx:Label width="100%" text="个人简历" styleName="title" />
<mx:Spacer height="8" />
<mx:Grid width="649" height="523">
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="姓名" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="吉林市" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="性别" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="男" />
</mx:GridItem>
<mx:GridItem width="99" rowSpan="5" styleName="photo">
<mx:Image width="90" height="100"
source="http://avatar.csdn.net/C/7/6/3_chaoloveyou.jpg" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="出生日期" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="-200000-1-1" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="籍贯" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="吉林市丰满区" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="姓名" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="jason" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="性别" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="男" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="民族" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="暂缺" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="政治面貌" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="群众" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="身高" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="178cm" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="健康状况" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="优秀" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem width="70">
<mx:Label text="学历" />
</mx:GridItem>
<mx:GridItem width="110">
<mx:Label text="无" />
</mx:GridItem>
<mx:GridItem width="70">
<mx:Label text="毕业院校" />
</mx:GridItem>
<mx:GridItem width="110" colSpan="2">
<mx:Label text="吉林大学软件学院" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem colSpan="5">
<mx:Label text="◇教育经历◇" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="78">
<mx:GridItem colSpan="5" />
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem colSpan="5">
<mx:Label text="◇工作经验◇" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="78">
<mx:GridItem colSpan="5">
<mx:Label text="本人擅长打猎、捕鱼、采集野果、制作石器、生火等,有20年以上工作经验。" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem colSpan="5">
<mx:Label text="◇项目经验◇" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="78">
<mx:GridItem colSpan="5">
<mx:VBox styleName="box">
<mx:Label text="猎野猪(与他人合作完成)" />
<mx:Label text="捡兔子(野火烧熟的)" />
<mx:Label text="曾独立捕到一人长大鲤鱼一条" />
</mx:VBox>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="21">
<mx:GridItem colSpan="5">
<mx:Label text="◇自我评价◇" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow height="78">
<mx:GridItem colSpan="5">
<mx:Label text="乐观向上、有团队合作精神" />
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:VBox>
</mx:Canvas>

</mx:Application>
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP