Need to Print Text with Larger Font Size...!
-
HI,
In my embedded device i need to print the "Text on Paper" with a bigger font size, how can i increase the size of using Qt Application so that i can pass the string to our printer API in order to print font with bigger size on paper.Please guide me,
Thanks in advance,
Rohith.G -
Hi
Just adjust the Font in the painter you use for printing? -
Hi Mrjj,
Thanks for replying, sorry to say this i didn't get what you have said.!
Thanks in advance,
Rohith.G -
Hi
http://doc.qt.io/qt-5/printing.htmlQPrinter printer; printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFileName("/my.pdf"); QPainter painter; QFont font=painter.font() ; font.setPointSize ( 64 ); /// BIIG painter.setFont(font); painter.drawText(10, 10, "Test 2"); painter.end();
-
Hi Mrjj,
How can print the Bigger size on "paper", the code posted by you will print in the PDF File.
How can i get the data into String so that i can print..!Thanks in advance,
Rohith.G -
@Rohith There is no difference. Just use a real printer instead of PDF. See http://doc.qt.io/qt-5/qprinter.html#setPrinterName
How do you actually print now? -
@Rohith said in Need to Print Text with Larger Font Size...!:
How can i get the data into String so that i can print..!
What data is it? From where do you get it?