|
My software needs to print a document of fixed width and variable length. Because of cost, the customer only uses the LQ300K printer. This printer is designed to print continuous paper, but because it is printed in pages, it will go every time the printing is completed One or more pages of paper, because they are full pages, often take a lot of white space. After each print, the user needs to manually twist the printer's rollers.This is not only troublesome, it makes the software look irregular, but also Reduce the life of the printer and bring unnecessary losses to customers!
This document is used to display the details of a certain data.Because the number of detailed rows is not fixed, it may be many or small, so the length of the document cannot be fixed. Sometimes, it may exceed one page of A4, sometimes it may only have one page. Three or four lines of content, so I can't use a fixed custom format page to complete this function (I have found the way to use a custom page), because the length of the custom format page is also fixed
I have searched online for a long time and there is no article that can solve such a problem, but I know someone has already solved this problem
It is impossible to write PaperMode = 256 in code.It is not enough to simply set the width and height of the printer. The API-based codes found on the Internet are used to dynamically load custom pages, that is, only custom ones can be used. Page setup to print, this is not what I want
Requirements to solve the problem: LQ300K printer must be used, no matter what method is used, as long as the printer can print out and stop at the exact position after printing is complete
The possible ways I think of are the following, of course, I want to think about it, none of them have been implemented.
1. Dynamically generate a custom page, using this page to set up printing will naturally have no problems. This is the preferred method, but no implementation method has been found.
2.Set a custom page, the page height is the row height, I don't want to use this method to achieve it, and there is no experiment, because the font size in this document is not the same
3.Use the method of line to achieve, but in this case, you need to use the control character, it is difficult to write, let alone, and it cannot be expressed in the form of report preview. Of course, if there is no way, this method will work
My level is limited, I haven't thought of other ways to achieve it, I hope that you can take the time to help solve the problem, I am grateful !!!!!!!! |
|