Method for printing ultra-long drawing by using limited-length printer
Technical Field
The invention relates to a method for printing a super-long drawing, in particular to a method for printing the super-long drawing by using a printer with a limited length.
Background
At present, along with the improvement of exploration and drilling technologies, the drilling depth of a drilled well is deeper and deeper, the measuring well section of a logging well is longer and longer, the logging drawing is also longer and longer, and the length of the drawing is often in the printing length of tens of meters or even tens of meters.
Although printers capable of printing ultra-long color drawings are available on the market at present, the printers are often extremely expensive or need to be customized, and have the problem of difficulty in after-sales maintenance. However, the conventional common roll paper printer, such as the Epson SC-T5280 printer, has an upper limit of 15m for the page length, and cannot print when the length of the drawing exceeds 15 m.
Some consider that, in this type of printer, since a limit is set on the length of a single page, it is theoretically possible to print by splitting the lengthy well-logging drawing into a plurality of pages, but by trying to find that there is a blank between each page printed after splitting the lengthy drawing into a plurality of pages, continuous drawings cannot be formed. And the blank between the pages can not be canceled by simple printing setting of an operator, because the printing setting is limited to be written into hardware by a manufacturer, the page spacing can be adjusted within a certain range, but the printing setting can not be modified to be smaller than the set minimum value, and the blank between the pages can not be canceled, so that the effective continuous printing of the overlong drawing can not be realized.
At present, no more solution to the above technical problems exists.
Disclosure of Invention
The invention aims to solve the technical problems and provides a method for printing an ultralong drawing by using a limited-length printer, which is extremely simple, easy to operate, effective in reducing equipment investment, easy to maintain and maintain, high in printing efficiency and capable of meeting the requirement of printing the ultralong drawing.
The invention relates to a method for printing a superlong drawing by using a limited-length printer, which comprises the following steps:
1) the following settings are made for the printer driver of the printer:
the medium source is as follows: rolling paper;
page size: the width is not less than the width of the drawing and not more than the width of the roll paper, and the length is less than 1 meter page;
the surface format is as follows: is arranged in a longitudinal direction;
high-level options: the auto-cut item is set to off;
printing the file after the setting is finished to generate a prn printing file;
2) modify the PRN file generated by the print driver:
opening the PRN file, and respectively searching information of a printing page length, a page setting, a page changing instruction, a paper feeding instruction and a printing page number;
modifying the printed page length information to make the page length equal to the current page length and page number; modifying the page setting to make the top interval and the bottom interval of the page 0; deleting a page changing instruction and a paper feeding instruction; the number of printed pages is changed to 1.
After the modification is finished, the file is saved as a new PRN file;
3) sending the modified new PRN file obtained in the step 2) to a printer by using a printing data sending program 'Rawprint.exe' provided by Microsoft;
4) and the printer outputs a complete drawing.
Further, in step 2), the information of the print page length, the page setting, and the page change instruction is obtained by binary search, specifically as follows, where X and Y are wildcards and represent one byte, and XXXX and YYYY represent integers occupying 4 bytes:
the binary instruction code for the print page length is "1B 28430400 XXXX", where 1B28430400 is the instruction and "XXXX" is the page length value;
the binary instruction code of the page setting is "1B 2863080054000000 YYYY", wherein "54000000" is a fixed margin, and "YYYY" is a value of the page length minus the margin;
the binary instruction code of the page-change instruction is 'OC';
the binary instruction code of the paper feeding instruction is '1B 28440400 XXXX';
the binary instruction code of the print number is "52454D 4F5445314A 58440000001002X";
further, in the step 2), the modifying method includes:
and modifying the length of the printing page: modifying 'XXXXX' in a binary code '1B 28430400 XXXX' into a 4-bit binary code corresponding to a total printed page length value of super-long printing, wherein the total printed page length value of the super-long printing is a new integer obtained by multiplying an integer value represented by the 'XXXXX' by the number of pages;
and modifying page setting: modifying '1B 2863080054000000' in the binary code '1B 2863080054000000 YYYY' into '1B 2863080000000000', and then modifying 'YYYYY' into a 4-bit binary code corresponding to the total printing page length value of the ultra-long printing;
deleting a page-changing instruction "0C" and a paper-feeding instruction "1B 28440400 XXXX" of binary codes in the file:
modifying the number of printed pages: the binary code "52454D 4F5445314a 58440000001002X" is modified to "52454D 4F5445314a 5844000000100201".
Further, in step 2), in the PRN file, the page-change instruction and the paper-feeding instruction appear together when the page is changed, and the two instructions are found and deleted by searching "OC 1B 28440400".
The instruction searching, modifying and deleting process of the step 2) can be completed through manual or written program execution.
Has the advantages that:
the invention overcomes the technical prejudice that the common finite length printer can not print the ultra-long drawing, overcomes the printing setting limitation written by a manufacturer into hardware, does not change the hardware, does not rewrite a new driving program, but modifies part of instructions in a PRN file generated by the printing driving program before printing each time, thereby leading the printer with the limited printing length to realize the printing of the ultra-long drawing (more than 15m and even dozens of meters), meeting the continuous printing requirement of an ultra-long logging diagram, having no blank between pages during printing, and having good continuity and integrity of patterns on the drawing, and the method is suitable for various printers supporting the roll paper of ESP/P RASTER printing instructions, such as Epson SC-T5280, Epson 7908, Epson P6080, Epson SureColor T5480M, Epson T80 and the like. The method is also suitable for printing pdf pictures with continuous pages of content as continuous pictures.
Drawings
FIG. 1 is a block flow diagram of the method of the present invention.
Detailed Description
Example one: certain JY8-7 well electric imaging logging result diagram
1) JY8-7 borehole electrical imaging logging achievement picture width 10.5in length 22 meters, use Epson SC-T5280 printer according to the following print settings: the medium source is as follows: rolling paper; paper size: 11 x 17 in; page layout: is arranged in a longitudinal direction; high-level options: the auto-cut item is set to off; then click to print, select "print to file", generate the print file: JY8-7. prn;
2) modifying the printing instructions in JY8-7.prn includes:
finding a page change instruction '0C' and a paper feeding instruction '1B 2844040040381428' by searching 'OC 1B 28440400', deleting the page change instruction '0C' and the paper feeding instruction '1B 2844040040381428' in the file, and deleting the instructions for 50 times in total;
a find print page length instruction of "1B 28430400D02F 0000", modifying it to "1B 28430400A 0560900";
then searching a page setting command of '1B 28630800540000007C2F 0000', and modifying the command into '1B 2863080000000000A 0560900';
finally, the instruction of printing page number '52454D 4F5445314A 5844000000100232' is modified into '52454D 4F5445314A 5844000000100201', and the finished saved file is JY8-7. prn.prn;
3) transmitting JY8-7.prn.prn file to Epson SC-T5280 printer by Rawprint.exe program;
4) the printer outputs a log graph.
The method of the invention is utilized to completely output the JY8-7 well electric imaging logging result diagram.
As can be seen from example 1, the invention successfully prints 22 m ultra-long log images, which are complete and continuous and meet the requirements of filing data.
Example two: XX1 well cementation curve result chart
1) The XX1 well is about 7700 meters deep, the result graph of the well cementation curve is 10.5in wide and 39 meters long, and the Epson SC-T5280 printer is used for printing the following settings: the medium source is as follows: rolling paper; paper size: 11 x 17 in; page layout: is arranged in a longitudinal direction; high-level options: the auto-cut item is set to off; then click to print, select "print to file", generate the print file: prn, XX1;
2) the written program is used for modifying the printing instruction in XX1.prn, and the specific steps are as follows:
finding a page change instruction '0C' and a paper feeding instruction '1B 2844040040381428' by searching 'OC 1B 28440400', deleting the page change instruction '0C' and the paper feeding instruction '1B 2844040040381428' in the file, and deleting the instruction for 91 times;
find paper length set command "1B 28430400D02F 0000", modify command to "1B 28430400F0FE 1000";
then searching a page setting command of '1B 28630800540000007C2F 0000', and modifying the command into '1B 286308000000A 0560900';
finally, the page number instruction "52454D 4F5445314A 584400000010025B" is modified to "52454D 4F5445314A 5844000000100201"; after the modification is finished, the file is saved as XX1. prn.prn;
3) the xx1.prn file is sent to the epresen SC-T5280 printer by the rawprint. exe program;
4) and outputting a well cementation curve result graph by a printer.
The XX1 well electric imaging logging result graph is completely output by the invention.
As can be seen from the second example, the invention successfully prints the 39-meter ultra-long well log, and the graphs are complete and continuous and meet the requirements of filing data.
Example three: PXX1 well logging curve achievement diagram
1) The PXX1 well is a well in the north plateau area, the well depth is about 3700 meters, the diagram of the logging curve achievement is 10.5 inches wide and 18 meters long, and the Epson 7908 printer is used for printing the following settings: the medium source is as follows: rolling paper; paper size: 11 x 17 in; page layout: is arranged in a longitudinal direction; high-level options: the auto-cut item is set to off; then click to print, select "print to file", generate the print file: PXX1. prn;
2) the method for modifying the printing instruction in PXX1.prn by using the written program comprises the following specific steps:
finding a page change instruction '0C' and a paper feeding instruction '1B 2844040040381428' by searching 'OC 1B 28440400', deleting the page change instruction '0C' and the paper feeding instruction '1B 2844040040381428' in the file, and deleting the instruction for 41 times;
finding a paper length setting command of "1B 28430400D02F 0000", modifying the command to "1B 2843040050A 80700";
then searching a page setting command of '1B 28630800540000007C2F 0000', and modifying the command into '1B 286308000000000050A 80700';
finally, the page number instruction "52454D 4F5445314A 5844000000100229" is modified to "52454D 4F5445314A 5844000000100201"; after the modification is finished, the file is saved as XX1. prn.prn;
3) the xx1.prn file is sent to the epresen SC-T5280 printer by the rawprint. exe program;
4) and outputting a well cementation curve result graph by a printer.
The invention completely outputs a PXX1 well electrical imaging logging result chart.
As can be seen from the third example, the invention successfully uses the Epp 7908 printer to print the 18-meter overlong log map, and the map is complete and continuous and meets the requirements of filing data.