diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c index 0710e05f..437f0866 100644 --- a/backend/tests/testcommon.c +++ b/backend/tests/testcommon.c @@ -3474,7 +3474,7 @@ int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source, testutil_pclose(fp); - if (data_mode && (is_eci_convertible(symbol->eci) || symbol->eci >= 899)) { + if ((data_mode && is_eci_convertible(symbol->eci)) || symbol->eci >= 899) { const int eci = symbol->eci >= 899 ? 3 : symbol->eci; int error_number; const int eci_length = get_eci_length(eci, (const unsigned char *) buffer, cnt); @@ -3621,7 +3621,6 @@ int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, in sprintf(maxi + maxi_len, "%.*s\035%.*s\035%.*s\035", primary_len - 6, primary, 3, primary + primary_len - 6, 3, primary + primary_len - 3); #endif - printf("primary %s, primary_len %d\n", primary, primary_len); maxi_len = (int) strlen(maxi); memcpy(maxi + maxi_len, expected, expected_len); expected = maxi; diff --git a/docs/images/gui_export.png b/docs/images/gui_export.png index a7950347..c4f981e2 100644 Binary files a/docs/images/gui_export.png and b/docs/images/gui_export.png differ diff --git a/docs/manual.pmd b/docs/manual.pmd index 5e9e3bc7..a106e205 100644 --- a/docs/manual.pmd +++ b/docs/manual.pmd @@ -908,8 +908,11 @@ followed by the angle of rotation as shown below. ## 4.9 Adjusting Image Size The scale of the image can be altered using the `--scale` option followed by a -multiple of the default X-dimension. The scale is multiplied by 2 before being -applied. The default scale is 1. +multiple of the default X-dimension. The scale is multiplied by 2 (with the +exception of MaxiCode) before being applied. The default scale is 1. + +For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF +vector output, and by 2 otherwise (non-EMF vector output). For raster output, the default X-dimension is 2 pixels (except for MaxiCode, see [4.9.2 MaxiCode Raster Scaling] below). For example for PNG images a scale of 5 @@ -3690,7 +3693,7 @@ A matrix symbology developed by Ted Williams in 1992 which encodes data in a way similar to Data Matrix, Code One is able to encode the Latin-1 character set or GS1 data, and also supports the ECI mechanism. There are two types of Code One symbol - fixed-ratio symbols which are roughly square (versions A -through to H) and variable-width versions (version S and T). These can be +through to H) and variable-width versions (versions S and T). These can be selected by using `--vers` (API `option_2`) as shown in the table below: ------------------------------------------------------------ diff --git a/docs/manual.txt b/docs/manual.txt index a16f0a3e..a0c53a15 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -1009,8 +1009,11 @@ followed by the angle of rotation as shown below. 4.9 Adjusting Image Size The scale of the image can be altered using the --scale option followed by a -multiple of the default X-dimension. The scale is multiplied by 2 before being -applied. The default scale is 1. +multiple of the default X-dimension. The scale is multiplied by 2 (with the +exception of MaxiCode) before being applied. The default scale is 1. + +For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF +vector output, and by 2 otherwise (non-EMF vector output). For raster output, the default X-dimension is 2 pixels (except for MaxiCode, see 4.9.2 MaxiCode Raster Scaling below). For example for PNG images a scale of 5 @@ -3598,7 +3601,7 @@ A matrix symbology developed by Ted Williams in 1992 which encodes data in a way similar to Data Matrix, Code One is able to encode the Latin-1 character set or GS1 data, and also supports the ECI mechanism. There are two types of Code One symbol - fixed-ratio symbols which are roughly square (versions A through to H) -and variable-width versions (version S and T). These can be selected by using +and variable-width versions (versions S and T). These can be selected by using --vers (API option_2) as shown in the table below: -------------------------------------------------------------- @@ -4355,7 +4358,10 @@ OPTIONS --scale=NUMBER - Set the X-dimension. NUMBER may be floating-point. + Set the X-dimension. NUMBER may be floating-point, and is multiplied by 2 + (except for MaxiCode) before being applied. For MaxiCode, the scale is + multiplied by 10 for raster output, by 20 for EMF vector output, and by 2 + otherwise. The default scale is 1. --scmvv=INTEGER diff --git a/docs/zint.1 b/docs/zint.1 index 9c436604..2883b233 100644 --- a/docs/zint.1 +++ b/docs/zint.1 @@ -334,7 +334,11 @@ the maximum number of rows for GS1 DataBar Expanded Stacked .TP \f[V]--scale=NUMBER\f[R] Set the X-dimension. -\f[I]NUMBER\f[R] may be floating-point. +\f[I]NUMBER\f[R] may be floating-point, and is multiplied by 2 (except +for MaxiCode) before being applied. +For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for +EMF vector output, and by 2 otherwise. +The default scale is 1. .TP \f[V]--scmvv=INTEGER\f[R] For MaxiCode, prefix the Structured Carrier Message (SCM) with diff --git a/docs/zint.1.pmd b/docs/zint.1.pmd index 63c3b951..64355846 100644 --- a/docs/zint.1.pmd +++ b/docs/zint.1.pmd @@ -268,7 +268,9 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S `--scale=NUMBER` -: Set the X-dimension. *NUMBER* may be floating-point. +: Set the X-dimension. *NUMBER* may be floating-point, and is multiplied by 2 (except for MaxiCode) before being + applied. For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF vector output, and by 2 + otherwise. The default scale is 1. `--scmvv=INTEGER` diff --git a/frontend_qt/exportwindow.cpp b/frontend_qt/exportwindow.cpp index c9a5bf40..ece58d3d 100644 --- a/frontend_qt/exportwindow.cpp +++ b/frontend_qt/exportwindow.cpp @@ -44,6 +44,7 @@ ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data) : m_bc(b linDestPath->setText(settings.value(QSL("studio/export/destination"), QDir::toNativeSeparators(QDir::homePath())).toString()); linPrefix->setText(settings.value(QSL("studio/export/file_prefix"), QSL("bcs_")).toString()); + linPostfix->setText(settings.value(QSL("studio/export/file_postfix"), QSL("")).toString()); cmbFileName->setCurrentIndex(settings.value(QSL("studio/export/name_format"), 0).toInt()); cmbFileFormat->setCurrentIndex(settings.value(QSL("studio/export/filetype"), 0).toInt()); @@ -65,6 +66,7 @@ ExportWindow::~ExportWindow() settings.setValue(QSL("studio/export/destination"), linDestPath->text()); settings.setValue(QSL("studio/export/file_prefix"), linPrefix->text()); + settings.setValue(QSL("studio/export/file_postfix"), linPostfix->text()); settings.setValue(QSL("studio/export/name_format"), cmbFileName->currentIndex()); settings.setValue(QSL("studio/export/filetype"), cmbFileFormat->currentIndex()); } @@ -139,6 +141,7 @@ void ExportWindow::process() } QString filePathPrefix = linDestPath->text() % QDir::separator() % linPrefix->text(); + QString postfix = linPostfix->text(); QStringList Feedback; int successCount = 0, errorCount = 0; @@ -168,9 +171,9 @@ void ExportWindow::process() default: url_escaped += name_qchar; break; } } - fileName = filePathPrefix % url_escaped % suffix; + fileName = filePathPrefix % url_escaped % postfix % suffix; } else { - fileName = filePathPrefix % dataString % suffix; + fileName = filePathPrefix % dataString % postfix % suffix; } break; case 1: { /* Formatted Serial Number */ @@ -180,7 +183,7 @@ void ExportWindow::process() pad.fill('0', biggest.length() - this_val.length()); - fileName = filePathPrefix % pad % this_val % suffix; + fileName = filePathPrefix % pad % this_val % postfix % suffix; } break; } diff --git a/frontend_qt/extExport.ui b/frontend_qt/extExport.ui index f1f8e1c5..430270dc 100644 --- a/frontend_qt/extExport.ui +++ b/frontend_qt/extExport.ui @@ -82,6 +82,29 @@ + + + File Name Postfi&x: + + + The last part of the filenames + + + linPostfix + + + + + + + The last part of the filenames + + + + + + + File &Name: @@ -94,7 +117,7 @@ - + Set the naming convention used by the files @@ -111,7 +134,7 @@ - + File &Format: @@ -124,7 +147,7 @@ - + The type of file which you want to create