CN100377067C - Printing setup method in restoring printing apparatus in view window operation system - Google Patents

Printing setup method in restoring printing apparatus in view window operation system Download PDF

Info

Publication number
CN100377067C
CN100377067C CNB2006100094767A CN200610009476A CN100377067C CN 100377067 C CN100377067 C CN 100377067C CN B2006100094767 A CNB2006100094767 A CN B2006100094767A CN 200610009476 A CN200610009476 A CN 200610009476A CN 100377067 C CN100377067 C CN 100377067C
Authority
CN
China
Prior art keywords
printing
setting
data structure
memory
application program
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.)
Active
Application number
CNB2006100094767A
Other languages
Chinese (zh)
Other versions
CN1828515A (en
Inventor
乔昕明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CNB2006100094767A priority Critical patent/CN100377067C/en
Publication of CN1828515A publication Critical patent/CN1828515A/en
Application granted granted Critical
Publication of CN100377067C publication Critical patent/CN100377067C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The present invention discloses a printing setup method for storing and restoring a printer in a windows operation system. The method records a printing setup data structure of the printer in a memory, reads out the complete recorded data copy from the memory and stores the data copy in a storing device. When an application program is started again for printing, the complete data copy is loaded from the storing device in order to cover the printing setup data structure corresponding to the application program. The method of the present invention relieves the repeated labor of setting the printer by hand, rapidly completes multiple preset setting modes aiming at a single or a plurality of printers, is convenient for people to output documents in a uniform printing specification and can complete the printing task for paper of a particular specification on the ordinary printer.

Description

Preserve and recover the method for the setting of printing of printing device in a kind of Windows
Technical field
The present invention relates to a kind of in Windows to the preservation of the setting of printing data of printing device and the method for recovery.
Background technology
Relate in the application program of printing in existing Microsoft's Window operating system, often need collaborative different printing device to cooperate, perhaps on same printing device, carry out the cooperation of different settings of printing.Setting of printing operation is loaded down with trivial details under the prior art, and can not write down used printing device and setting of printing automatically, prints default print equipment only at every turn, all needs manual selective printing equipment and configuring print setting in addition, and complex operation is made mistakes easily.
Therefore, there is the ease for use defective in the setting of printing technology of application program in the existing Windows, awaits improvement and perfect.
Summary of the invention
The object of the present invention is to provide the method for preserving and recover the setting of printing of printing device in a kind of Windows, preservation and recovery by to the setting of printing data structure partial data of the application program correspondence that is applicable to Windows realize preservation and recovery to the setting of printing of printing device.
In order to realize above-mentioned purpose of the present invention, the invention provides the method for preserving and recover the setting of printing of printing device in a kind of Windows, comprise and preserving and recovering step, wherein preserving step comprises: a) according to the definite printing arrangement about described printing device of the print processing of the application program that is applicable to described Windows, determine the setting of printing data structure of described printing device thus according to described printing arrangement; B) obtain in the address space of described application program memory address corresponding to described setting of printing data structure; C) being recorded in the partial data of described setting of printing data structure copy according to described memory address is in the newly assigned internal memory of described application program; D) partial data of playback record copies from described newly assigned internal memory, and it is stored in the memory storage; And recovering step comprises: e) when described application program starts described print processing once more, be written into described partial data copy from described memory storage, cover the setting of printing data structure of described application program correspondence; F) carry out print processing based on the setting of printing data structure that is covered by loaded partial data copy.
The method that setting of printing is preserved and recovered in a kind of Windows provided by the present invention, owing to adopted the preservation and the recovery of corresponding setting of printing data structure partial data in the application program that is applicable to Windows, thereby realized handled easily, guaranteed the quick and accurate of printing different printing device and the different settings of printing of same printing device.
Setting of printing of the present invention is meant the setting of printing of all types of printing device that Windows is supported, setting of printing comprises and is not limited to address in this computing machine or LAN (Local Area Network) of printing device model, printing device, prints used paper, printer paper transverse and longitudinal, print quality, page order, printing umber, printer paper margin and special printing function information that dissimilar printing device provided.
Using this patent method can preserve respectively the different settings of printing of different printing device, and can recover as required in same application.
In Windows, need the application program of printing function can directly use this method or quote the subroutine that has realized this method and realize described setting of printing save and restore feature.
Description of drawings
Fig. 1 preserves the schematic flow sheet of the setting of printing of printing device for the present invention;
Fig. 2 recovers the schematic flow sheet of the setting of printing of printing device for the present invention.
Embodiment
Below in conjunction with accompanying drawing, will be described in detail preferred embodiment of the present invention, so that its technical scheme and beneficial effect thereof are apparent.
Described method of the present invention is a kind of computer program or method of preserving and recover the setting of printing of printing device in being applicable to the application program of Windows, the inventive method will be applicable to that the partial data of the setting of printing data structure that application program provided of Windows preserves, and can when follow-up printing, specify recovery, the setting of printing after the recovery can be finished normal print out task.
The inventive method relates to all types of printing device that computing machine, Windows and Windows are supported, is used for the data in the operating window operating system application program particular memory region, and directly influences the output effect of printing device.The common printing flow process of prior art is: prepare document->manual selective printing equipment, be provided with print parameters->send print command->print.And print flow process after the application of the inventive method be: prepare document->the automatic selective printing equipment of computer program, be provided with print parameters->send print command->print.Prerequisite is when printing first printing device to be provided with, for example certain loom in the LAN (Local Area Network) has 3 printer PNT1, PNT2, PNT3, PNT1 is a laser printer, PNT2 is a color inkjet printer, PNT3 is a stylus printer, because the printer characteristic of having nothing in common with each other: the PNT1 print speed is fast, but can not the printing color map sheet, be suitable for printing normal words; PNT2 can printing color map sheet and literal, but print speed is slow, generally only is used to print the map sheet of needs colour; PNT3 can only be used for printed invoice etc., and the paper that adds in advance also is reproducible invoice, waits at any time and printing.Like this, for increasing work efficiency, possibility one application program, such as financial the report or the planning report program may produce the file to be printed of image mixed character typeset, wherein also may have invoice.When printing, can print with PNT1 as a few pages or leaves, print with PNT3 for several pages in addition by program or artificial the setting; While as the typesetting format of printing, sharpness or the like also need have additional type information to guarantee to print correct.The setting of above-mentioned printer, in internal memory, write down when especially printing at being arranged in of different printers, so operating system could be controlled correct the printing, and concerning the application program that is applicable to windows system, setting of printing data structure wherein promptly refers to PRINTDLG or PRINTDLGEX data structure, read-write to this setting of printing data structure partial data is a core inventive point of the present invention, but does not have any technical literature open partial data read-write operation about this data structure now.
Preserve and recover the method for the setting of printing of printing device in the Windows of the present invention, as indicated in Fig. 1 and Fig. 2, said method comprising the steps of:, determine the setting of printing data structure of described printing device thus according to described printing arrangement according to the definite printing arrangement of the print processing of the application program that is applicable to described Windows about described printing device; Obtain in the address space of described application program memory address corresponding to described setting of printing data structure; According to described memory address, the partial data copy of described setting of printing data structure is recorded in in the newly assigned internal memory of described application program; The partial data of playback record copies from described newly assigned internal memory, and it is stored in the memory storage; When described application program starts described print processing once more, from described memory storage, be written into described partial data copy, cover the setting of printing data structure of described application program correspondence; And based on the described setting of printing data structure execution print processing that is capped.
The present invention preserve printing device setting of printing schematic flow sheet as shown in Figure 1 be:
S11) obtain interior Windows setting of printing data structure PRINTDLG of described program process or the memory address of PRINTDLGEX.Distribute voluntarily when described application program need be handled print out task and dispose PRINTDLG or PRINTDLGEX data structure, and it is passed to Windows obtain contact with the physics printing device, so can obtain the memory address of PRINTDLG or PRINTDLGEX from described application program;
S12) analyze this setting of printing data structure, divide to be used in the memory field of preserving the setting of printing data structure.Need to analyze the memory size of setting of printing data structure itself and specific handle member data occupancy pointed thereof, be used for this setting of printing data structure of the complete preservation of storage allocation.Specific handle member is meant hDevMode and the hDevNames member in PRINTDLG or the PRINTDLGEX structure.
The PRINTDLG structure:
typedef?struct?tagPD{
DWORD lStructSize;
HWND hwndOwner;
HGLOBAL hDevMode;
HGLOBAL hDevNames;
HDC hDC;
DWORD Flags;
WORD nFromPage;
WORD nToPage;
WORD nMinPage;
WORD nMaxPage;
WORD nCopies;
HINSTANCE?hInstance;
LPARAM lCustData;
LPPRINTHOOKPROC?lpfnPrintHook;
LPSETUPHOOKPROC?lpfnSetupHook;
LPCTSTR lpPrintTemplateName;
LPCTSTR lpSetupTemplateName;
HGLOBAL hPrintTemplate;
HGLOBAL hSetupTemplate;
}PRINTDLG,*LPPRINTDLG;
The PRINTDLGEX structure:
typedef?struct tagPDEX {
DWORD lStructSize;
HWND hwndOwner;
HGLOBAL hDevMode;
HGLOBAL hDevNames;
HDC hDC;
DWORD Flags;
DWORD Flags2;
DWORD ExclusionFlags;
DWORD nPageRanges;
DWORD nMaxPageRanges;
LPPRINTPAGERANGE?lpPageRanges;
DWORD nMinPage;
DWORD nMaxPage;
DWORD nCopies;
HINSTANCE hInstance;
LPCTSTR lpPrintTemplateName;
LPUNKNOWN lpCallback;
DWORD nPropertyPages;
HPROPSHEETPAGE?*lphPropertyPages;
DWORD nStartPage;
DWORD dwResultAction;
}PRINTDLGEX,*LPPRINTDLGEX;
S13) data and the specific handle member data pointed of this setting of printing data structure PRINTDLG or PRINTDLGEX itself are copied in the described newly assigned memory field;
S14) data in the new storage allocation district are saved in memory storage (comprise and be not limited to disk file and database).
The present invention recover printing device setting of printing schematic flow sheet as shown in Figure 2 be:
S21) from described memory storage, data are written in the newly assigned memory field;
S22) with handle mode storage allocation, obtain new handle, and the described data that are written into corresponding specific handle member in the data are copied into wherein; Cover the setting of printing data structure with the described corresponding data that is written in the record data; The specific handle member who is capped in the setting of printing data structure is modified to described new handle.
But the inventive method fit applications program is recovered the previous complete setting of printing of preserving of user automatically under different application scenarioss, shorten the preliminary work before printing, and increases work efficiency.The inventive method has been exempted the manual duplication of labour that printing device is set, and is convenient to the document of many people output print uniform specification, and can finishes the print out task to the specific standard paper on normal printer.
But should be understood that above-mentioned description to specific embodiment of the present invention is comparatively concrete, can not therefore be interpreted as the restriction of scope that the present invention is asked for protection, its scope of patent protection should be as the criterion with claims.

Claims (4)

1. preserve and recover the method for the setting of printing of printing device in the Windows, comprise and preserving and recovering step,
Wherein preserving step comprises:
A), determine the setting of printing data structure of described printing device thus according to described printing arrangement according to the definite printing arrangement of the print processing of the application program that is applicable to described Windows about described printing device;
B) obtain in the address space of described application program memory address corresponding to described setting of printing data structure;
C), the partial data copy of described setting of printing data structure is recorded in in the newly assigned internal memory of described application program according to described memory address;
D) partial data of playback record copies from described newly assigned internal memory, and it is stored in the memory storage;
And recovering step comprises:
E) when described application program starts described print processing once more, from described memory storage, be written into described partial data copy, cover the setting of printing data structure of described application program correspondence;
F) carry out print processing based on the setting of printing data structure that is covered by loaded partial data copy.
2. method according to claim 1, wherein said setting of printing data structure is meant PRINTDLG or the PRINTDLGEX data structure of being announced in the MSDN of the Microsoft document library.
3. method according to claim 1, wherein said step c) may further comprise the steps:
C1) analyze the setting of printing data structure, determine to preserve the required memory size of its partial data, according to the new storage allocation of this memory size;
C2) according to the memory address of described setting of printing data structure the partial data of this setting of printing data structure is copied in the described new storage allocation district;
The partial data of wherein said setting of printing data structure is meant the data in the shared region of memory of setting of printing data structure itself, and the data in the specific handle member of the setting of printing data structure region of memory pointed.
4. method according to claim 1, wherein said step e) may further comprise the steps
E1) with handle mode storage allocation, obtain new handle, and the described data that are written into corresponding specific handle member in the data are copied into wherein;
E2) according to the memory address of setting of printing data structure, cover the setting of printing data structure with the described corresponding data that is written in the data; The specific handle member who is capped in the setting of printing data structure is modified to above-mentioned new handle.
CNB2006100094767A 2006-02-23 2006-02-23 Printing setup method in restoring printing apparatus in view window operation system Active CN100377067C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100094767A CN100377067C (en) 2006-02-23 2006-02-23 Printing setup method in restoring printing apparatus in view window operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100094767A CN100377067C (en) 2006-02-23 2006-02-23 Printing setup method in restoring printing apparatus in view window operation system

Publications (2)

Publication Number Publication Date
CN1828515A CN1828515A (en) 2006-09-06
CN100377067C true CN100377067C (en) 2008-03-26

Family

ID=36946935

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100094767A Active CN100377067C (en) 2006-02-23 2006-02-23 Printing setup method in restoring printing apparatus in view window operation system

Country Status (1)

Country Link
CN (1) CN100377067C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136069A (en) * 2011-11-30 2013-06-05 北大方正集团有限公司 Method and device of backup restore for printing procedures

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1359058A (en) * 2000-08-30 2002-07-17 精工爱普生株式会社 Printer and interface, and control method and information recording medium
CN1479196A (en) * 2002-08-29 2004-03-03 ��ʿͨ��ʽ���� Imaging system and back-end processor
EP1524124A1 (en) * 2002-07-19 2005-04-20 Seiko Epson Corporation Printing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1359058A (en) * 2000-08-30 2002-07-17 精工爱普生株式会社 Printer and interface, and control method and information recording medium
EP1524124A1 (en) * 2002-07-19 2005-04-20 Seiko Epson Corporation Printing system
CN1479196A (en) * 2002-08-29 2004-03-03 ��ʿͨ��ʽ���� Imaging system and back-end processor

Also Published As

Publication number Publication date
CN1828515A (en) 2006-09-06

Similar Documents

Publication Publication Date Title
US6480866B2 (en) Method and apparatus to facilitate creation of documents from individual pages
US6487567B1 (en) Method and system for manipulating page-breaks in an electronic document
DE69633580T2 (en) PRESSURE SYSTEM
US8120790B2 (en) Method and system to allow printing compression of documents
US20020015169A1 (en) Variable data print job system
US20040163049A1 (en) Document processing method
JPH08115178A (en) Variable data field in page description language
DE10161886A1 (en) Late connection of register image contents to ordered register sheets
DE10344343A1 (en) Method and device for workflow generation for the production of image recording media
US6414755B1 (en) Automated digital printing workflow and a method of automatic bleed generation
CN100377067C (en) Printing setup method in restoring printing apparatus in view window operation system
JPWO2007000875A1 (en) Label printing device
US20040036916A1 (en) Printing system
EP1470472B1 (en) Method for the automatic reception and forwarding of document processing orders
JP2007128325A (en) Printing control apparatus and means therefor
JP2008187672A (en) Image output system
JP3218088B2 (en) Printer
JP2006202025A (en) Document processing method, print control method, and its system
DE10134493B4 (en) Method for automatically finding outdated printed documents
JP5832163B2 (en) Information processing apparatus, print setting method, and program
JP4437705B2 (en) Postscript writing system, program, and recording medium
US20050248597A1 (en) Data stream reference to external resources
US10996909B2 (en) Document processing for printing
JP4851378B2 (en) Page data creation method and printing system
JPH09185605A (en) Document printer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant