7#include "pdf417barcode_p.h"
8#include "zxingutil_p.h"
10#include <ZXing/BitMatrix.h>
11#include <ZXing/MultiFormatWriter.h>
17Pdf417Barcode::Pdf417Barcode()
18 : AbstractBarcodePrivate(
Barcode::TwoDimensions)
22QImage Pdf417Barcode::paintImage()
25 ZXing::MultiFormatWriter writer(ZXing::BarcodeFormat::PDF417);
29 writer.setEncoding(ZXing::CharacterSet::BINARY);
32 const auto matrix = writer.encode(ZXingUtil::toStdWString(m_data), 4, 1);
33 return ZXingUtil::toImage(matrix, m_foreground, m_background);
34 }
catch (
const std::invalid_argument &e) {
39QSizeF Pdf417Barcode::preferredSize(qreal devicePixelRatio)
const
41 return m_cache.size() * (devicePixelRatio < 2 ? 2 : 1);
A barcode generator for a fixed barcode format.
Provides classes and methods for generating barcodes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:54 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.