简体   繁体   中英

How to cut paper to be of picture size in C#?

I have to make an application to print pictures in this printer DNP DSRX1, it has many different paper sizes to cut them in different formats, like 6x4" or 2x6".

I can print already, my problem is to cut these papers in the right format.

I tried setting the paper size with PrinterSettings.DefaultPageSettings.PaperSize, but it doesn't cut the paper as I expected.

I have no idea how I can use the PrintDocument to do this, or if I need to use something else.

I am really stuck on this, appreciate any help.

This is my code to set the paper size:

printDocument1.PrinterSettings.DefaultPageSettings.PaperSize = new PaperSize("size", (int)Width, (int)Height);

So, I don't think this is possible after quite some research. The solution to my problem was to use Linux print terminal commands in the application. Linux has plenty of configurations for printing, so that was the best solution I got.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM