CN111381785A - 一种设置系统默认打印机并调用打印文件的方法 - Google Patents
一种设置系统默认打印机并调用打印文件的方法 Download PDFInfo
- Publication number
- CN111381785A CN111381785A CN202010124224.9A CN202010124224A CN111381785A CN 111381785 A CN111381785 A CN 111381785A CN 202010124224 A CN202010124224 A CN 202010124224A CN 111381785 A CN111381785 A CN 111381785A
- Authority
- CN
- China
- Prior art keywords
- printer
- calling
- setting
- file
- printers
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- BQCADISMDOOEFD-UHFFFAOYSA-N Silver Chemical compound [Ag] BQCADISMDOOEFD-UHFFFAOYSA-N 0.000 claims description 6
- 229910052709 silver Inorganic materials 0.000 claims description 6
- 239000004332 silver Substances 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1229—Printer resources management or printer maintenance, e.g. device status, power levels
- G06F3/1231—Device related settings, e.g. IP address, Name, Identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1268—Job submission, e.g. submitting print job order or request not the print data itself
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
本发明公开了一种设置系统默认打印机并调用打印文件的方法,基于C++基础上采用windows提供的API函数通过不同打印机的打印机名称来设置默认打印机,之后输入待打印文件的根目录文件名调用系统打印机打印所输的doc,txt,pdf,jpg等格式的文件。通过上述方式,本发明能够适用于各种型号打印机,能够减少开发调试工作量,减少在开发或使用上出错的情况。
Description
技术领域
本发明涉及银医自助系统领域,特别是涉及一种设置系统默认打印机并调用打印文件的方法。
背景技术
在银医自主系统中经常会使用各种型号的打印机或者凭条打印机来打印各种格式的医院文件,如果使用多个控件调用,不仅使用起来麻烦而且还容易混乱,增加了实施和发开人员的工作量。
现有的银医自助系统调用各个型号的打印机需要厂家提供调用打印机的底层接口或者oid命令,并在此基础上进行二次开发生成对应的打印机控件,不仅增加了开发和实施的工作量并且会导致出错率增加,使用该方法后只需安装厂家提供的系统打印驱动,不仅明显减少和降低了开发的工作量及错误率,还适配于大多数项目要求。
发明内容
本发明主要解决的技术问题是提供一种设置系统默认打印机并调用打印文件的方法,能够减少开发调试工作量,减少在开发或使用上出错的情况。
为解决上述技术问题,本发明采用的一个技术方案是:提供一种设置系统默认打印机并调用打印文件的方法,包括:基于C++基础上采用windows提供的API函数通过不同打印机的打印机名称来设置默认打印机,之后输入待打印文件的根目录文件名,调用系统打印机打印所输的doc、txt、pdf、jpg格式的文件。
进一步,具体步骤如下:BS架构的银医自助机系统在调用打印机前设置默认打印机,如果该设备有多个打印机则先通过输入不同的打印机名称来设置,设置成功后根据厂家提供的打印机状态检测底层接口进行检测打印机是否能正常工作,之后输入要打印的文件根目录文件名调用打印方法来实现调用打印机打印功能。
本发明的有益效果是:本发明能够适用于各种型号打印机,能够减少开发调试工作量,减少在开发或使用上出错的情况。
附图说明
图1是本发明一种设置系统默认打印机并调用打印文件的方法一较佳实施例的流程图。
具体实施方式
下面结合附图对本发明的较佳实施例进行详细阐述,以使本发明的优点和特征能更易于被本领域技术人员理解,从而对本发明的保护范围做出更为清楚明确的界定。
请参阅图1,本发明实施例包括:
一种设置系统默认打印机并调用打印文件的方法,包括:基于C++基础上主要采用windows提供的API函数通过不同打印机的打印机名称来设置默认打印机,之后输入要打印文件的根目录文件名调用系统打印机打印所输的doc,txt,pdf,jpg等格式的文件。具体实施步骤如下:BS架构的银医自助机系统在调用打印机前设置默认打印机,如果该设备有多个打印机则先通过输入不同的打印机名称来设置,设置成功后根据厂家提供的打印机状态检测底层接口进行检测打印机是否能正常工作,之后输入要打印的文件根目录文件名调用打印方法来实现调用打印机打印功能。
银医系统经常会使用打印机打印各种文件,现将其统一改为调用系统的默认打印机,打印适合大多数情况的使用。本发明能够方便BS架构的银医系统修改默认的系统打印机并调用其打印doc,txt,pdf,jpg等格式的文件,只要调用系统打印机,能够适用于各种型号打印机,能够减少开发调试工作量,减少在开发或使用上出错的情况。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
Claims (2)
1.一种设置系统默认打印机并调用打印文件的方法,其特征在于,包括:基于C++基础上采用windows提供的API函数通过不同打印机的打印机名称来设置默认打印机,之后输入待打印文件的根目录文件名,调用系统打印机打印所输的doc、txt、pdf、jpg格式的文件。
2.根据权利要求1所述的一种设置系统默认打印机并调用打印文件的方法,其特征在于:具体步骤如下:BS架构的银医自助机系统在调用打印机前设置默认打印机,如果该设备有多个打印机则先通过输入不同的打印机名称来设置,设置成功后根据厂家提供的打印机状态检测底层接口进行检测打印机是否能正常工作,之后输入要打印的文件根目录文件名调用打印方法来实现调用打印机打印功能。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010124224.9A CN111381785A (zh) | 2020-02-27 | 2020-02-27 | 一种设置系统默认打印机并调用打印文件的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010124224.9A CN111381785A (zh) | 2020-02-27 | 2020-02-27 | 一种设置系统默认打印机并调用打印文件的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111381785A true CN111381785A (zh) | 2020-07-07 |
Family
ID=71217143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010124224.9A Withdrawn CN111381785A (zh) | 2020-02-27 | 2020-02-27 | 一种设置系统默认打印机并调用打印文件的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111381785A (zh) |
-
2020
- 2020-02-27 CN CN202010124224.9A patent/CN111381785A/zh not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8543915B2 (en) | “Proof print” for job settings | |
US20130293916A1 (en) | Image processing apparatus, method of controlling image processing apparatus, and computer readable medium | |
CN108762694B (zh) | Linux操作系统中打印驱动处理方法及装置 | |
McLaughlin | Line printer daemon protocol | |
EP2624121A2 (en) | Information processing apparatus, control method, and program | |
JP2006276907A (ja) | 機能変換装置、機能変換方法、機能変換プログラム、デバイスデータ生成装置、デバイスデータ生成方法、及びデバイスデータ生成プログラム | |
EP2315112A1 (en) | Plug-in software program, function expanding method and function expanding device | |
US8446620B2 (en) | Data processing apparatus and data processing method | |
US20020140958A1 (en) | Page description language adapted for direct printing of multiple file formats | |
US20150356384A1 (en) | Information processing apparatus, recording medium, and control method | |
KR20030040816A (ko) | 프린트 데이터의 재인쇄방법 | |
US8982404B2 (en) | Information processing apparatus, recording medium, and control method to display management information for managing a job | |
JP2007293772A (ja) | 印刷装置制御システム及びプリンタドライバ | |
CN111381785A (zh) | 一种设置系统默认打印机并调用打印文件的方法 | |
JP2008165291A (ja) | 情報処理装置及びプログラム | |
EP2048577A3 (en) | Method and apparatus for driving a printer driver | |
US20110283237A1 (en) | Information processing apparatus, control method thereof, and storage medium | |
US8922823B2 (en) | Information processing apparatus and storage medium with the function of adding a cover letter to a print job | |
JP2017033052A (ja) | 画像形成装置における制御装置およびプログラム | |
KR100720922B1 (ko) | 인쇄 제어 프로그램을 격납한 전자계산기, 및 인쇄 제어용 프로그램을 기록한 전자계산기로 읽을 수 있는 저장매체 | |
US8218166B2 (en) | Print processing system and print processing method | |
US9507553B2 (en) | Image forming apparatus, image forming control apparatus, image forming system and image forming control program | |
JP6833419B2 (ja) | 情報処理装置、方法およびプログラム | |
US11775236B2 (en) | Information processing apparatus, processing method of information processing apparatus, and storage medium | |
US10481844B2 (en) | Data communication method and information processing apparatus having multiple print settings |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200707 |
|
WW01 | Invention patent application withdrawn after publication |