Custom printing paper C # GDI + exact position Printing

Source: Internet
Author: User

Write a winfor tableProgramDue to the special paper size, the printer-related content has not been set for half a day in C. Finally, you have to set it in the operating system. The method is as follows:

On the Control Panel, open the printer and fax machine settings window.

1. Open the server attribute of the File menu, define a new paper type in it, and set the paper size and print margin.

2. Right-click the printer and select the new paper type from the paper area.

3. Return to the program and directly control the Printing Based on the paper.

Haha, as expected, printing is successful.

In the C # GDI +, set the pageunit attribute of the graphics object to graphicsunit. millimeter, in this way, when the drawstring method is used to output the string, the coordinate unit is changed to millimeters, and then the text output at the exact position is very easy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.