PrintWidthes静的クラス - automatic9045/TRS.MS-12 GitHub Wiki
よく使われる紙幅をメンバーにもつクラスです。
public static class PrintWidthes
基本情報
名前空間 TRS.TMS12.Interfaces
アセンブリ MS-12.PluginHost.dll
継承 Object → PrintWidthes
Usage
IPrinterPlugin.PrintWidth プロパティの設定に利用すると便利です。
public class SamplePrinter : IPrinterPlugin
{
public PluginHost PluginHost { get; set; }
public int PrintWidth { get; } = PrintWidthes.Width58;
…略…
}
定数
int Width58 = 58;
58 mm。マルス券と同一幅で、レシート等にも使われます。
int Width80 = 80;
80 mm。一般的なマルス券の長さ (85 mm) に近い値で、券面を横向きで印刷するのに適しています。
レシート等にも使われます。
int WidthB5Shorter = 182 - 10 * 2;
162 mm。B5 コピー用紙の短辺の長さから両端 10 mm ずつの余白を除いた値です。
int WidthB5Longer = 257 - 10 * 2;
237 mm。B5 コピー用紙の長辺の長さから両端 10 mm ずつの余白を除いた値です。
int WidthA4Shorter = 210 - 10 * 2;
190 mm。A4 コピー用紙の短辺の長さから両端 10 mm ずつの余白を除いた値です。
int WidthA4Longer = 297 - 10 * 2;
277 mm。A4 コピー用紙の長辺の長さから両端 10 mm ずつの余白を除いた値です。