I'm developing an application that, among other things, lets the user print payment orders in a continuous, pre-printed, carbonless copy paper in a dot-matrix printer. That is made throught a software library that takes layout files designed in advance and fills it with data. But the position of elements in the layout is not corresponding with the final positions of these elements in the paper.
The library is smart enough to export the order in a PDF file, where the same problem happens. What is more, it let me know what the problem is. Let me explain:
I created a special layout test file with some lines at the top of the page. I set up beforehand the paper size, in both the layout and the printer (creating a new paper size in the "Print Server Properties" window). After exporting it in a PDF and trying to print it, the Print window appears. It's in Spanish, but I hope the important things can be understood:
The scale page setting is set on "None" and the document and paper size are the same. However, there is a small upper margin hiding part of the lines. I haven't set those margins in the created page size, so I think is a default minimun margin. This is not a problem at ifself (I don't need actually to print at the top) but in combination with another detail.
Matrix printers has a property called "top of form" that is the position in the page where the printer will print the first line. When I set up that parameter to the minimum, I get this result:
It prints from (almost) the top of the page, but it prints the document starting from out the margin. If I set in Acrobat the "fit to margin" option, this happens, confirming the theory.
Top of form parameter only sets the start in another position. If I set that in a lower position, I get this:
I can see two posibilities to get my layouts the way I set it:
- Set that minimum margin to 0. Is that possible? I haven't found it in the printer options.
- Set the top of form parameter in a way it coincides with that minimum margin, that way I can't print at the top but the rest of elements will be positioned relative to that top. But how can I get to know what this margin is? I haven't found any information in the user guide of my test printer (an Oki Microline 621) and that settings must be set in different printers.