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 the well logging 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 dozens of meters or even dozens 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 paper 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 for solving the technical problems is available.
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;
after the setting is finished, printing the file 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 enable the page length to be equal to the length of the current page x 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 "1B28430400XXXX", where 1B28430400 is the instruction and "XXXX" is the page length value;
the binary instruction code of the page setting is 1B2863080054000000YYYY, wherein '54000000' is a fixed margin, and 'YYYY' is a value obtained by subtracting the margin from the page length;
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 page number is "52454D4F5445314A58440000001002X";
further, in the step 2), the modifying method is:
and modifying the length of the printing page: modifying 'XXXXX' in a binary code '1B 28430400 XXXXXX' into a 4-bit binary code corresponding to a total printed page length value of ultra-long printing, wherein the total printed page length value of the ultra-long printing is a new integer obtained by multiplying an integer value represented by the 'XXXXX' by the number of pages;
and (3) modifying page setting: modifying '1B 2863080054000000' in the binary code '1B 2863080054000000 YYYY' into '1B 2863080000000000', and modifying 'YYYYY' into a 4-bit binary code corresponding to the total printing page length value of the ultra-long printing;
deleting a page change instruction "0C" and a paper feeding instruction "1B28440400 XXXXXX" of binary codes in the file:
modifying the number of printed sheets: the binary code "52454D4F5445314a58440000001002X" is modified to "52454D4F5445314a5844000000100201".
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 "OC1B 28440400".
The instruction searching, modifying and deleting process of the step 2) can be completed through manual or written program execution.
Has the beneficial effects 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, even dozens of meters), meeting the continuous printing requirement of an ultra-long log, no blank between pages during printing, and 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 Sure color T5480M, epson T3280 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 electric imaging logging achievement graph width 10.5in length 22 m, using Epson SC-T5280 printer according to the following printing settings: the medium source is as follows: rolling paper; paper size: 11 x 17in; 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) The modification of the printing instruction 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 search print page length instruction "1B28430400D02F0000", which is modified to "1B28430400a0560900";
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;
3) Transmitting JY8-7.prn.prn files to an Epson SC-T5280 printer through a 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 cementing curve result chart
1) The XX1 well is about 7700 meters deep, the result graph of the well cementation curve is 10.5 inches wide and 39 meters long, and an Epson SC-T5280 printer is used for printing according to the following settings: the medium source is as follows: rolling paper; paper size: 11 x 17in; page layout: is arranged in a longitudinal direction; high-level options: the auto-cut item is set to off; then clicking to print, selecting 'print to file', generating a print file: prn, XX1;
2) Modifying the printing instruction in XX1.prn by using the written program, specifically:
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;
searching for a paper length setting command of "1B28430400D02F0000", modifying the command to "1B28430400F0FE1000";
then searching a page setting command '1B 28630800540000007C2F 0000', and modifying the command to '1B286308000000 A0560900';
finally, a page number instruction "52454D4F5445314A584400000010025B" is modified into "52454D4F5445314A5844000000100201"; 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 the XX1 well electrical imaging logging result map.
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 result graph
1) The PXX1 well is a well in a north workzone of a plateau, the well depth is about 3700 meters, the diagram width of a logging curve result diagram is 10.5in, and the length is 18 meters, and the PXX1 well is printed by using an Epson 7908 printer according to the following printing settings: the medium source is as follows: rolling paper; paper size: 11 x 17in; 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 "1B2844040040381428" by searching "OC1B28440400", deleting the page change instruction "0C" and the paper feeding instruction "1B2844040040381428" in the file, and deleting the instruction 41 times;
searching for a paper length setting command of "1B28430400D02F0000", modifying the command to "1B2843040050a80700";
then searching a page setting command '1B 28630800540000007C2F 0000', and modifying the command to '1B2863080000000000 50A80700';
finally, the page number instruction "52454D4F5445314A5844000000100229" is modified to "52454D4F5445314A5844000000100201"; after the modification is finished, saving the file as XX1.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 borehole electrical imaging logging result diagram.
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.