I am trying to generate an XPS document to print to an Epson Thermal Printer - EPSON TM-T88IV ReceiptE4
The paper types available are:
A4 210 x 297 mm
LT 8.5 x 11 in
Postcard 100 x 148 mm
Roll Paper 80 x 297 mm
Under PageSetup
, A4 is available. Whether I print TXT or PDF, the text is really small as though it is assuming 8 1/2 by 11 and shrinking.
I also tried to directly print with Document.Print(printerName)
. The TXT file actually prints better, but the PDF is gibberish.
var document = DocumentModel.Load(fileToConvert);
foreach (var section in document.Sections)
{
var pageSetup = section.PageSetup;
pageSetup.Orientation = Orientation.Portrait;
pageSetup.PaperType = PaperType.A4;
}
document.Save(fileToOutput); // Output to XPS extension