How to duplex print?
-
I updated the first post. I only want to print a double sided page/duplex directly/without using print dialog.
-
Did you check that you are trying to use the correct printer ?
-
Did you check that you are trying to use the correct printer ?
-
Yes, and I will make a check function for it. But the code is right?
-
Yes, and I will make a check function for it. But the code is right?
-
How do you create m_printer ?
-
How do you create m_printer ?
-
@m_printer = new QPrinter(QPrinter::HighResolution);
m_printer->setPageSize(QPageSize(QPageSize::A4));
m_printer->setOrientation(QPrinter::Portrait);
m_printer->setPageMargins(QMarginsF(20.f,20.f,10.f,10.f));@ -
@m_printer = new QPrinter(QPrinter::HighResolution);
m_printer->setPageSize(QPageSize(QPageSize::A4));
m_printer->setOrientation(QPrinter::Portrait);
m_printer->setPageMargins(QMarginsF(20.f,20.f,10.f,10.f));@ -
You should rather use the second constructor using QPrinterInfo to ensure you are using the right device
-
You should rather use the second constructor using QPrinterInfo to ensure you are using the right device