Solved How to print barcode on the page or pdf document?
-
Hİ @mrjj ,
Well, is there any sample how to use this library in Qt?It must be a easier way to print barcodes in Qt!...
Regards,
Mucip:) -
@Mucip The examples are right there: http://www.zint.org.uk/Manual.aspx?type=p&page=5
They do not use Qt, but it is just C++.
If you think Qt should support bardcodes you can file a change request or even submit a patch. -
Hi,
I think I can do it with Zint CLIhttp://www.zint.org.uk/Manual.aspx?type=p&page=4
It creates the barcode png of the requested data very easilly.
By the way there is qt GUI version too. But I couldn't run it anyway. :)http://www.zint.org.uk/Manual.aspx?type=p&page=3
Now issue is as SOLVED for me...
Regards,
Mucip:) -
Hi,
I tryed to use zint as below but did not get success?!QProcess process;
process.setWorkingDirectory("D:\\ProgramFiles\\Zint\");
process.start("zint.exe", QStringList() << " -o c:\\sil\\kod.png -d 'CSI0070-1200'");Why?...
Regards,
Mucip:) -
@Mucip
Hi
QProcess has error signal you can try to hook up to and see what it says.
often that gives clues to what happens. -
@Mucip said in How to print barcode on the page or pdf document?:
" -o c:\sil\kod.png -d 'CSI0070-1200'
This is wrong. Each parameter needs to be a string, not all in one string...
-
Hi @jsulm ,
I changed do below but still nothing?!process.start("zint.exe", QStringList() << "-o c:\\sil\\kod.png" << "-d 'CSI0070-1200'");
Regards,
Mucip:) -
Hi @jsulm
Noe it worked... Thanks...process.start("zint.exe", QStringList() << "-o" << "c:\sil\kod.png" << "-d" << "'CSI0070-1200'");
Regards,
Mucip:) -
@Mucip
Windows: Install any downloaded Barcode font on your machine and print the order number with this fontGerhard
-
Hi @Gerhard,
But in this case, you need to install same barcode fonts on every deployed machines. And this is not clear solution for me unfortunatelly... :(Regards,
Mucip:) -
Just as a note.
you can bundle the font with the app as a resource
and activate it via
int id = QFontDatabase::addApplicationFont(":/fonts/monospace.ttf");