CN1828515A - 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
CN1828515A
CN1828515A CN 200610009476 CN200610009476A CN1828515A CN 1828515 A CN1828515 A CN 1828515A CN 200610009476 CN200610009476 CN 200610009476 CN 200610009476 A CN200610009476 A CN 200610009476A CN 1828515 A CN1828515 A CN 1828515A
Authority
CN
China
Prior art keywords
printing
setting
data structure
memory
printing data
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.)
Granted
Application number
CN 200610009476
Other languages
Chinese (zh)
Other versions
CN100377067C (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 disclosed method comprises: storing the data structure of print setting of the printing device into the memory; reading out the complete data copy from memory to store into a storage device and cover the opposite data structure of application software. This invention avoids manual setting, is convenient to print documents with uniform format, and also fit to the printing task with special request to paper size.

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, may further comprise the steps:, determine the setting of printing data structure of described printing device thus according to described printing arrangement a) 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) 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; 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 described setting of printing data structure that is capped.
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, may further comprise the steps:
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;
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 described setting of printing data structure that is capped.
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 true CN1828515A (en) 2006-09-06
CN100377067C 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)

Cited By (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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1187058A3 (en) * 2000-08-30 2003-01-02 Seiko Epson Corporation Printing apparatus, data storage medium, interface device, printer control method, and interface control method
JPWO2004009362A1 (en) * 2002-07-19 2005-11-17 セイコーエプソン株式会社 Printing system
JP2004086809A (en) * 2002-08-29 2004-03-18 Fuji Xerox Co Ltd Image formation system and back-end processor

Cited By (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

Also Published As

Publication number Publication date
CN100377067C (en) 2008-03-26

Similar Documents

Publication Publication Date Title
US6480866B2 (en) Method and apparatus to facilitate creation of documents from individual pages
US6549294B2 (en) Variable data print job system
US6992790B2 (en) Method and apparatus for improving page description language (PDL) efficiency by recognition and removal of redundant constructs
CN1786896A (en) Device to edit documents for printout and method thereof
CN1794167A (en) Method of setting printing parameter
US20080285074A1 (en) Systems, devices, and methods for variable data printing
US8120813B2 (en) Method for printing mixed color and black and white documents
CN1744085A (en) Image file management apparatus and method
CN1148696A (en) Printing control means, information treatment means and storage medium
CN1932802A (en) Host device having extraction function of text and extraction method thereof
CN100462911C (en) Method for generating large plate lattice data and large plate lattice data senerating apparatus
US6414755B1 (en) Automated digital printing workflow and a method of automatic bleed generation
CN1908930A (en) Method for implementing automatic typesetting based on cloning block
CN1266647C (en) Image processor, image processing method, program and memory medium
CN1519750A (en) File processing method and its appts.
US20050102055A1 (en) Information storage using tables and scope indices
CN1828515A (en) Printing setup method in restoring printing apparatus in view window operation system
US20080266606A1 (en) Optimized print layout
US20100088584A1 (en) Methods and systems for processing a document in a print-production system
CN1824517A (en) Print data compiling device and method, print data compiling program, and printing method
US8860994B2 (en) Electronic replacement of pre-printed forms
JP2001078018A (en) Data editing device
DE102004016693A1 (en) Method and device for processing image data
US7652784B2 (en) Image forming apparatus, image forming method and image forming system for receiving and executing plurality of print jobs
US10996909B2 (en) Document processing for printing

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