I'm using Spire.Pdf to print transaction receipts on roll paper but the printed result is stretched when compared to the PDF file opened on the computer.
Does anyone know what I'm doing wrong? I've also noticed that this works well on Windows 7 PC. I only detect this problem on Windows 10, with the same printer.
Here is the code that I'm using.
- Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pdfFileName);
doc.CompressionLevel = PdfCompressionLevel.None;
doc.PrinterName = szPrinter;
doc.PrintFromPage = 1;
doc.PrintToPage = 1;
doc.PrintDocument.Print();
Thank you in advance.