打印机打印机怎么打印当前页页

本帖子已过去太久远了,不再提供回复功能。你可能感兴趣的文章
首先要说明的是,咱现在不是高手,最多还是一个半桶水,算是入了JS的门。 谈不上经验...
说明:正则表达式通常用于两种任务:1.验证,2.搜索/替换。用于验证时,通常需要在前...
js 获取div高度并重新设置div高度与宽度 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0...
下面给大家简单讲下在Javascript操作字符串的几种方式,分别使用到这些函数concat、in...
setTimeout()在js类中的使用方法 setTimeout (表达式,延时时间) setTimeout(表达式,交...打印机测试页怎么打?打印测试页面的方法
作者:佚名
字体:[ ] 来源:互联网 时间:12-04 14:06:04
很多人在安装好打印机以后,不知道如何在电脑上操作打印测试页,下面分享打印机打印测试页面的方法,需要的朋友可以参考下
  很多人在安装好打印机以后,不知道如何在电脑上操作打印测试页,下面就是具体步骤。
  1、点击电脑左下角windows标志,找到&设备和打印机&,点击进入。
  2、进入后找到安装的打印机,在上面单击右键,找到&打印机属性&,不是最后的&属性&。
  3、进入后找到&打印测试页&,点击就会开始打印了。
大家感兴趣的内容
12345678910
最近更新的内容在Word2003工具栏中添加“打印当前页”按钮
您现在的位置:&&>>&&>>&&>>&正文
在Word2003工具栏中添加“打印当前页”按钮
作者: 文章来源:本站原创 点击数: 更新时间: 13:31:06
&&& Word 2003工具栏中提供的“打印”按钮只能打印整个文档,但有时仅需打印文档中的某一页。虽然可以通过菜单“文件→打印”,在“打印”对话框中选择“当前页”进行打印,但多次点击鼠标稍有不便。Word虽没有提供一个打印当前页的内置命令,但我们可以写一句简单的宏代码来打印当前页,同时还可以将这个宏命令添加到“常用”工具栏中,需要时只需将光标定位在页面中,单击该按钮即可打印当前页,十分方便。操作步骤如下:
&&& 1.单击菜单“工具→宏→宏”,打开“宏”对话框。在“宏名”下方输入一个名称,如“打印当前页”,单击“创建”按钮,打开VBA编辑器。
&&& 2.在VBA编辑器右侧的代码窗口中,可以看到一段代码。如本例代码为:
&&& Sub 打印当前页()&&& '&&& ' 打印当前页 Macro&&& ' 宏在
由 Excel123 创建&&& '
&&& End Sub
&&& 在上述代码中间插入打印当前页的宏代码:
&&& Application.PrintOut Range:=wdPrintCurrentPage
&&& 然后关闭VBA编辑器返回Word文档界面。
&&& 3.单击菜单“工具→自定义”,打开“自定义”对话框。选择“命令”选项卡,在“类别”区域中选择“宏”,然后在右侧“命令”区域中,用鼠标左键按住“Normal.NewMacros.打印当前页”,将其拖到“常用”工具栏中“打印”按钮的右侧。
&&& 4.为“打印当前页”按钮设置图标。
&&& 继续保持打开“自定义”对话框,鼠标在“常用”工具栏中右击“打印”图标,在弹出的快捷菜单中选择“复制按钮图像”。
&&& 然后右击“Normal.NewMacros.打印当前页”,在弹出的快捷菜单中选择“粘贴按钮图像”。这时的“Normal.NewMacros.打印当前页”前的图标会添加一个打印机图标。
&&& 5.修改“打印当前页”按钮图标。
&&&&右击“Normal.NewMacros.打印当前页”按钮,在弹出的快捷菜单中选择“默认样式”,使该宏按钮仅显示为图标。但这个图标与“打印”图标完全相同,可以通过下面的设置进行更改。
&&& 再次右击“打印当前页”按钮,在弹出的快捷菜单中选择“编辑按钮图像”,弹出“按钮编辑器”对话框。
&&& 我们可以选取某种颜色,对图标进行修改。如本例中将打印机图标的某一部分设置为绿色。
&&& 单击“确定”按钮关闭对话框。最后关闭“自定义”对话框完成设置,当需要打印某一页时,只需将光标选定在该页面中,然后单击工具栏中的“打印当前页”按钮即可。
上一篇文章:
下一篇文章:
&其他网友还在看:
 网友评论:(评论内容只代表网友观点,与本站立场无关!)
::发表评论::
评论内容:
请遵守及中华人民共和国其他各项有关法律法规。
严禁发表危害国家安全、损害国家利益、破坏民族团结、破坏国家宗教政策、破坏社会稳定、侮辱、诽谤、教唆、淫秽等内容的评论 。
用户需对自己在使用本站服务过程中的行为承担法律责任(直接或间接导致的)。
评论需要审核通过后才可见,本站管理员有权保留或删除评论内容。
评论内容只代表网友个人观点,与本网站立场无关。
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Excel技巧天地 E-mail:iOS设备调用打印机打印-打印当前网页-打印一张图片-打印文本
1)添加UIPrintInteractionControllerDelegate 打印的委托代理协议
(2)添加打印按钮:
// & &打印 &
& & UIButton *printButton = [UIButton buttonWithType:UIButtonTypeSystem]; &
& & printButton.frame =CGRectMake(400,0,100,70); &
& & [printButton setTitle:@&打印& forState:UIControlStateNormal]; &
& & printButton.titleLabel.font = [UIFont systemFontOfSize:32]; &
& & [printButton addTarget:self &action:@selector(printAction:) forControlEvents:UIControlEventTouchUpInside]; &
& & [self.toolView addSubview:printButton]; &
(3)打印button相应的action
打印一张图片:
// & &打印 &
-(void)printAction:(id)sender{ &
& & & &UIPrintInteractionController *printC = [UIPrintInteractionController sharedPrintController];//显示出打印的用户界面。 &
& & & &printC.delegate = &
& & UIImage *img = [UIImage imageNamed:@&db.png&]; &
& & NSData *data = [NSData dataWithData:UIImagePNGRepresentation(img)]; &
& & if (printC && [UIPrintInteractionController canPrintData:data]) { &
& & & & UIPrintInfo *printInfo = [UIPrintInfo printInfo];//准备打印信息以预设值初始化的对象。 &
& & & & printInfo.outputType = UIPrintInfoOutputG//设置输出类型。 &
& & & & printC.showsPageRange = YES;//显示的页面范围 &
& & & & &&
// & & & &printInfo.jobName = @&willingseal&; &
& & & & &&
// & & & &printC.printInfo = printI &
// & & & &NSLog(@&printinfo-%@&,printC.printInfo); &
& & & & printC.printingItem =//single NSData, NSURL, UIImage, ALAsset &
// & & & &NSLog(@&printingitem-%@&,printC); &
& & & & &&
& & & & &&
& & & & // & &等待完成 &
& & & & &&
& & & & void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = &
& & & & ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) { &
& & & & & & if (!completed && error) { &
& & & & & & & & NSLog(@&可能无法完成,因为印刷错误: %@&, error); &
& & & & & & } &
& & & & }; &
& & & & &&
& & & & if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { &
& & & & & & &&
& & & & &UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:sender];//调用方法的时候,要注意参数的类型-下面presentFromBarButtonItem:的参数类型是 UIBarButtonItem..如果你是在的UIToolbar or UINavigationItem上放的一个打印button,就不需要转换了。 &
& & & & &[printC presentFromBarButtonItem:item animated:YES completionHandler:completionHandler];//在ipad上弹出打印那个页面 &
& & & & & & &&
& & & & } else { &
& & & & & & [printC presentAnimated:YES completionHandler:completionHandler];//在iPhone上弹出打印那个页面 &
& & & & } &
打印当前网页或者文本信息:
@property (strong,nonatomic)UIWebView *webV &
@property (strong,nonatomic)UIView *toolV &
@property (strong,nonatomic)NSString *currentURL; &
-(void) webViewDidFinishLoad:(UIWebView *)webView { &
& & &self.currentURL = webView.request.URL.absoluteS//获取当前网页的url &
& & NSLog(@&--url-%@--&,self.currentURL); &
// & &打印 &
-(void)printAction:(id)sender{ &
& & & &UIPrintInteractionController *printC = [UIPrintInteractionController sharedPrintController];//显示出打印的用户界面。 &
& & & &printC.delegate = &
& & & & UIPrintInfo *printInfo = [UIPrintInfo printInfo];//准备打印信息以预设值初始化的对象。 &
& & & & printInfo.outputType = UIPrintInfoOutputG//设置输出类型。 &
& & & & printC.showsPageRange = YES;//显示的页面范围 &
// & &打印网页 &
& & & & [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.currentURL]]];//网页 &
& & & & printC.printFormatter = [self.webView viewPrintFormatter];//布局打印视图绘制的内容。 &
// & &打印文本&
& & & & & & UISimpleTextPrintFormatter *textFormatter = [[UISimpleTextPrintFormatter alloc]&
& & & & & & &initWithText:@&ここの ういえい 子に うぃっl willingseal &  你好么? #@&%&&&*&];&
& & & & & & textFormatter.startPage = 0;&
& & & & & & textFormatter.contentInsets = UIEdgeInsetsMake(200, 300, 0, 72.0); // 插入内容页的边缘 1 inch margins&
& & & & & & textFormatter.maximumContentWidth = 16 * 72.0;//最大范围的宽&
& & & & & & &printC.printFormatter = textF&
& & & & &&
& & & & &&
& & & & // & &等待完成 &
& & & & &&
& & & & void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = &
& & & & ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) { &
& & & & & & if (!completed && error) { &
& & & & & & & & NSLog(@&可能无法完成,因为印刷错误: %@&, error); &
& & & & & & } &
& & & & }; &
& & & & &&
& & & & if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { &
& & & & & & &&
& & & & &UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:sender];//调用方法的时候,要注意参数的类型-下面presentFromBarButtonItem:的参数类型是 UIBarButtonItem..如果你是在系统的UIToolbar or UINavigationItem上放的一个打印button,就不需要转换了。 &
& & & & &[printC presentFromBarButtonItem:item animated:YES completionHandler:completionHandler];//在ipad上弹出打印那个页面 &
& & & & & & &&
// & & & &[printC presentFromRect:CGRectMake(500, 500, 100, 200) inView:self.webView animated:YES completionHandler:completionHandler];//第二种方法 &
& & & & & & &&
& & & & } else { &
& & & & & & [printC presentAnimated:YES completionHandler:completionHandler];//在iPhone上弹出打印那个页面 &
& & & & } &
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467142',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'

我要回帖

更多关于 excel打印当前页面 的文章

 

随机推荐