we utilized .Net's System.Drawing.Printing,
so our modified (and working) code looks like this:
var doc = new PrintDocument();
var printController = new StandardPrintController();
var ps = new PrinterSettings
{
PrinterName = PhotosConfig.PhotosPrinterName,
Copies = (short)copies,
DefaultPageSettings =
{
Landscape = true,
Margins = new Margins()
{
Top = 0,
Bottom = 0,
Left = 0,
Right = 0
}
}
};
doc.OriginAtMargins = false;
doc.PrinterSettings = ps;
doc.PrintController = printController;
doc.DefaultPageSettings.PaperSize = ps.PaperSizes[1]; var doc = new PrintDocument();
var printController = new StandardPrintController();
var ps = new PrinterSettings
{
PrinterName = PhotosConfig.PhotosPrinterName,
Copies = (short)copies,
DefaultPageSettings =
{
Landscape = true,
Margins = new Margins()
{
Top = 0,
Bottom = 0,
Left = 0,
Right = 0
}
}
};
doc.OriginAtMargins = false;
doc.PrinterSettings = ps;
doc.PrintController = printController;
doc.DefaultPageSettings.PaperSize = ps.PaperSizes[1];
doc.PrintPage += (sender, args) =>
{
var i = Image.FromFile(imagePath);
args.Graphics.DrawImage(i, args.MarginBounds);
};
doc.Print();
the problem had something to do with the appropriate paper size, so here's the full list:
// * paper sizes:
// [0] {[PaperSize 9x13(3.5x5") Kind=Custom Height=520 Width=362]} object {System.Drawing.Printing.PaperSize}
//+ [1] {[PaperSize 10x15(4x6") Kind=Custom Height=618 Width=409]} object {System.Drawing.Printing.PaperSize}
//+ [2] {[PaperSize 13x18(5x7") Kind=Custom Height=713 Width=520]} object {System.Drawing.Printing.PaperSize}
//+ [3] {[PaperSize 15x20(6x8") Kind=Custom Height=811 Width=618]} object {System.Drawing.Printing.PaperSize}
//+ [4] {[PaperSize 15x21(6x8.5") Kind=Custom Height=858 Width=618]} object {System.Drawing.Printing.PaperSize}
//+ [5] {[PaperSize 15x23 (6x9") Kind=Custom Height=913 Width=618]} object {System.Drawing.Printing.PaperSize}
//+ [6] {[PaperSize 10x15x2 (4x6"x2) Kind=Custom Height=831 Width=618]} object {System.Drawing.Printing.PaperSize}
//+ [7] {[PaperSize 5x15x2 Type1(2x6"x2) Kind=Custom Height=618 Width=409]} object {System.Drawing.Printing.PaperSize}
//+ [8] {[PaperSize 5x15x2 Type2(2x6"x2) Kind=Custom Height=618 Width=205]} object {System.Drawing.Printing.PaperSize}
//+ [9] {[PaperSize 5x15(2x6") Kind=Custom Height=618 Width=209]} object {System.Drawing.Printing.PaperSize}
//+ [10] {[PaperSize 15x15(6x6") Kind=Custom Height=618 Width=610]} object {System.Drawing.Printing.PaperSize}
//+ [11] {[PaperSize 13x13(5x5") Kind=Custom Height=520 Width=512]} object {System.Drawing.Printing.PaperSize}
//+ [12] {[PaperSize 9x13(3.5x5") white border Kind=Custom Height=520 Width=362]} object {System.Drawing.Printing.PaperSize}
//+ [13] {[PaperSize 10x15(4x6") white border Kind=Custom Height=618 Width=413]} object {System.Drawing.Printing.PaperSize}
//+ [14] {[PaperSize 13x18(5x7") white border Kind=Custom Height=713 Width=520]} object {System.Drawing.Printing.PaperSize}
//+ [15] {[PaperSize 15x20(6x8") white border Kind=Custom Height=811 Width=618]} object {System.Drawing.Printing.PaperSize}
//+ [16] {[PaperSize 15x23(6x9") white border Kind=Custom Height=913 Width=618]} object {System.Drawing.Printing.PaperSize}