mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Initial transfer from CVS
Transfer of version 2.3.2 from CVS repository
This commit is contained in:
19
frontend/CMakeLists.txt
Normal file
19
frontend/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# (c) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
||||
|
||||
project(zint_frontend)
|
||||
|
||||
set(zint_frontend_SRCS main.c )
|
||||
|
||||
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend")
|
||||
|
||||
add_executable(zint_frontend ${zint_frontend_SRCS})
|
||||
|
||||
set_target_properties(zint_frontend PROPERTIES OUTPUT_NAME "zint")
|
||||
|
||||
add_dependencies(zint_frontend zint)
|
||||
|
||||
link_directories( "${CMAKE_BINARY_DIR}/backend" )
|
||||
|
||||
target_link_libraries(zint_frontend zint)
|
||||
|
||||
install(TARGETS zint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)
|
31
frontend/Makefile
Normal file
31
frontend/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
# Linux makefile for zint - requires libzint
|
||||
#
|
||||
# make compiles zint
|
||||
# make install copies binary to /usr/local/bin
|
||||
# make uninstall removes the binary
|
||||
# make clean cleans up a previous compilation and any object or editor files
|
||||
#
|
||||
|
||||
ZINT_VERSION:=-DZINT_VERSION=\"2.3.2\"
|
||||
|
||||
CC := gcc
|
||||
INCLUDE := -I/usr/include
|
||||
CFLAGS := -g
|
||||
|
||||
prefix := /usr
|
||||
bindir := $(prefix)/bin
|
||||
DESTDIR :=
|
||||
|
||||
zint: main.c
|
||||
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend -L../backend main.c -o zint -lzint
|
||||
|
||||
.PHONY: install uninstall clean dist
|
||||
|
||||
clean:
|
||||
rm -f zint *.o *.a *~ *.png *.eps *.svg *.log
|
||||
|
||||
install:
|
||||
install -D -p zint $(DESTDIR)$(bindir)/zint
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)$(bindir)/zint
|
37
frontend/Makefile.mingw
Normal file
37
frontend/Makefile.mingw
Normal file
@ -0,0 +1,37 @@
|
||||
# Linux makefile for zint - requires libzint
|
||||
#
|
||||
# make compiles zint
|
||||
# make install copies binary to /usr/bin
|
||||
# make uninstall removes the binary
|
||||
# make clean cleans up a previous compilation and any object or editor files
|
||||
#
|
||||
|
||||
ZINT_VERSION:=-DZINT_VERSION=\"2.3.2\"
|
||||
|
||||
CC := gcc
|
||||
CFLAGS := -D_WIN32 -O2 -fms-extensions -mms-bitfields -fno-exceptions -fomit-frame-pointer -Wall -I../backend
|
||||
prefix := /mingw
|
||||
bindir := $(prefix)/bin
|
||||
DESTDIR :=
|
||||
|
||||
all: zint zint_static
|
||||
|
||||
%.res:%.rc
|
||||
windres -O coff --input-format=rc -i $< -o $@
|
||||
|
||||
zint: main.c zint.res
|
||||
$(CC) $(CFLAGS) -DZINT_DLL -DPNG_DLL -DZLIB_DLL $(ZINT_VERSION) $? zint.res -o $@ -L../backend -lzint
|
||||
|
||||
zint_static: main.c zint.res
|
||||
$(CC) -static $(CFLAGS) $(ZINT_VERSION) $? zint.res -o $@ -L../backend -lzint -lpng -lz
|
||||
|
||||
.PHONY: install uninstall clean dist
|
||||
|
||||
clean:
|
||||
rm -f zint *.o *.a *~ *.png *.eps *.svg *.log *.exe *.bak *.res
|
||||
|
||||
install:
|
||||
install -D -p zint $(DESTDIR)$(bindir)/zint
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)$(bindir)/zint
|
1213
frontend/getopt.c
Normal file
1213
frontend/getopt.c
Normal file
File diff suppressed because it is too large
Load Diff
169
frontend/getopt.h
Normal file
169
frontend/getopt.h
Normal file
@ -0,0 +1,169 @@
|
||||
/* Declarations for getopt.
|
||||
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
|
||||
1999, 2001, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
#ifndef __need_getopt
|
||||
# define _GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* If __GNU_LIBRARY__ is not already defined, either we are being used
|
||||
standalone, or this is the first header included in the source file.
|
||||
If we are being used with glibc, we need to include <features.h>, but
|
||||
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
|
||||
not defined, include <ctype.h>, which will pull in <features.h> for us
|
||||
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
|
||||
doesn't flood the namespace with stuff the way some other headers do.) */
|
||||
#if !defined __GNU_LIBRARY__
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns -1, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
#ifndef __need_getopt
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option
|
||||
{
|
||||
const char *name;
|
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
# define no_argument 0
|
||||
# define required_argument 1
|
||||
# define optional_argument 2
|
||||
#endif /* need getopt */
|
||||
|
||||
|
||||
/* Get definitions and prototypes for functions to process the
|
||||
arguments in ARGV (ARGC of them, minus the program name) for
|
||||
options given in OPTS.
|
||||
|
||||
Return the option character from OPTS just read. Return -1 when
|
||||
there are no more options. For unrecognized options, or options
|
||||
missing arguments, `optopt' is set to the option letter, and '?' is
|
||||
returned.
|
||||
|
||||
The OPTS string is a list of characters which are recognized option
|
||||
letters, optionally followed by colons, specifying that that letter
|
||||
takes an argument, to be placed in `optarg'.
|
||||
|
||||
If a letter in OPTS is followed by two colons, its argument is
|
||||
optional. This behavior is specific to the GNU `getopt'.
|
||||
|
||||
The argument `--' causes premature termination of argument
|
||||
scanning, explicitly telling `getopt' that there are no more
|
||||
options.
|
||||
|
||||
If OPTS begins with `--', then non-option arguments are treated as
|
||||
arguments to the option '\0'. This behavior is specific to the GNU
|
||||
`getopt'. */
|
||||
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
|
||||
#else /* not __GNU_LIBRARY__ */
|
||||
extern int getopt ();
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
|
||||
#ifndef __need_getopt
|
||||
extern int getopt_long (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
extern int getopt_long_only (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind,
|
||||
int __long_only);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Make sure we later can get all the definitions and declarations. */
|
||||
#undef __need_getopt
|
||||
|
||||
#endif /* getopt.h */
|
185
frontend/getopt1.c
Normal file
185
frontend/getopt1.c
Normal file
@ -0,0 +1,185 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
|
||||
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996,
|
||||
1997, 1998, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <getopt.h>
|
||||
#else
|
||||
# include "getopt.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#define GETOPT_INTERFACE_VERSION 2
|
||||
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (int argc,
|
||||
char *const *argv,
|
||||
const char *options,
|
||||
const struct option *long_options,
|
||||
int *opt_index)
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||
but does match a short option, it is parsed as a short option
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (int argc,
|
||||
char *const *argv,
|
||||
const char *options,
|
||||
const struct option *long_options,
|
||||
int *opt_index)
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
libc_hidden_def (getopt_long)
|
||||
libc_hidden_def (getopt_long_only)
|
||||
# endif
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"add", 1, 0, 0},
|
||||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 0, 0, 0},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
printf ("option %s", long_options[option_index].name);
|
||||
if (optarg)
|
||||
printf (" with arg %s", optarg);
|
||||
printf ("\n");
|
||||
break;
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
391
frontend/main.c
Normal file
391
frontend/main.c
Normal file
@ -0,0 +1,391 @@
|
||||
/* main.c - Command line handling routines for Zint */
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008 Robin Stuart <robin@zint.org.uk>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <getopt.h>
|
||||
#include <zint.h>
|
||||
#else
|
||||
#include "getopt.h"
|
||||
#include "zint.h"
|
||||
#endif
|
||||
#define NESET "0123456789"
|
||||
|
||||
void types(void) {
|
||||
printf( " 1: Code 11 51: Pharma One-Track 90: KIX Code\n"
|
||||
" 2: Standard 2of5 52: PZN 92: Aztec Code\n"
|
||||
" 3: Interleaved 2of5 53: Pharma Two-Track 93: DAFT Code\n"
|
||||
" 4: IATA 2of5 55: PDF417 97: Micro QR Code\n"
|
||||
" 6: Data Logic 56: PDF417 Trunc 98: HIBC Code 128\n"
|
||||
" 7: Industrial 2of5 57: Maxicode 99: HIBC Code 39\n"
|
||||
" 8: Code 39 58: QR Code 102: HIBC Data Matrix\n"
|
||||
" 9: Extended Code 39 60: Code 128-B 104: HIBC QR Code\n"
|
||||
"13: EAN 63: AP Standard Customer 106: HIBC PDF417\n"
|
||||
"16: GS1-128 66: AP Reply Paid 108: HIBC MicroPDF417\n"
|
||||
"18: Codabar 67: AP Routing 112: HIBC Aztec Code\n"
|
||||
"20: Code 128 68: AP Redirection 128: Aztec Runes\n"
|
||||
"21: Leitcode 69: ISBN 129: Code 23\n"
|
||||
"22: Identcode 70: RM4SCC 130: Comp EAN\n"
|
||||
"23: Code 16k 71: Data Matrix 131: Comp GS1-128\n"
|
||||
"24: Code 49 72: EAN-14 132: Comp Databar-14\n"
|
||||
"25: Code 93 75: NVE-18 133: Comp Databar Ltd\n"
|
||||
"28: Flattermarken 76: Japanese Post 134: Comp Databar Ext\n"
|
||||
"29: Databar-14 77: Korea Post 135: Comp UPC-A\n"
|
||||
"30: Databar Limited 79: Databar-14 Stack 136: Comp UPC-E\n"
|
||||
"31: Databar Extended 80: Databar-14 Stack Omni 137: Comp Databar-14 Stack\n"
|
||||
"32: Telepen Alpha 81: Databar Extended Stack 138: Comp Databar Stack Omni\n"
|
||||
"34: UPC-A 82: Planet 139: Comp Databar Ext Stack\n"
|
||||
"37: UPC-E 84: MicroPDF 140: Channel Code\n"
|
||||
"40: Postnet 85: USPS OneCode 141: Code One\n"
|
||||
"47: MSI Plessey 86: UK Plessey 142: Grid Matrix\n"
|
||||
"49: FIM 87: Telepen Numeric\n"
|
||||
"50: Logmars 89: ITF-14\n"
|
||||
);
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
printf(
|
||||
"Zint version %s\n"
|
||||
"Encode input data in a barcode and save as a PNG, EPS or SVG file.\n\n"
|
||||
" -h, --help Display this message.\n"
|
||||
" -t, --types Display table of barcode types\n"
|
||||
" -i, --input=FILE Read data from FILE.\n"
|
||||
" -o, --output=FILE Write image to FILE. (default is out.png)\n"
|
||||
" -d, --data=DATA Barcode content.\n"
|
||||
" -b, --barcode=NUMBER Number of barcode type (default is 20 (=Code128)).\n"
|
||||
" --height=NUMBER Height of symbol in multiples of x-dimension.\n"
|
||||
" -w, --whitesp=NUMBER Width of whitespace in multiples of x-dimension.\n"
|
||||
" --border=NUMBER Width of border in multiples of x-dimension.\n"
|
||||
" --box Add a box.\n"
|
||||
" --bind Add boundary bars.\n"
|
||||
" -r, --reverse Reverse colours (white on black).\n"
|
||||
" --fg=COLOUR Specify a foreground colour.\n"
|
||||
" --bg=COLOUR Specify a background colour.\n"
|
||||
" --scale=NUMBER Adjust size of output image.\n"
|
||||
" --directpng Send PNG output to stdout\n"
|
||||
" --directeps Send EPS output to stdout\n"
|
||||
" --directsvg Send SVG output to stdout\n"
|
||||
" --rotate=NUMBER Rotate symbol (PNG output only).\n"
|
||||
" --cols=NUMBER (PDF417) Number of columns.\n"
|
||||
" --vers=NUMBER (QR Code) Version\n"
|
||||
" --secure=NUMBER (PDF417 and QR Code) Error correction level.\n"
|
||||
" --primary=STRING (Maxicode and Composite) Structured primary message.\n"
|
||||
" --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n"
|
||||
" --gs1 Treat input as GS1 data\n"
|
||||
" --binary Treat input as Binary data\n"
|
||||
" --notext Remove human readable text\n"
|
||||
" --square Force Data Matrix symbols to be square\n"
|
||||
, ZINT_VERSION);
|
||||
}
|
||||
|
||||
int validator(char test_string[], char source[])
|
||||
{ /* Verifies that a string only uses valid characters */
|
||||
unsigned int i, j, latch;
|
||||
|
||||
for(i = 0; i < strlen(source); i++) {
|
||||
latch = 0;
|
||||
for(j = 0; j < strlen(test_string); j++) {
|
||||
if (source[i] == test_string[j]) { latch = 1; } }
|
||||
if (!(latch)) {
|
||||
return ERROR_INVALID_DATA; }
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct zint_symbol *my_symbol;
|
||||
int c;
|
||||
int error_number;
|
||||
int rotate_angle;
|
||||
int generated;
|
||||
|
||||
error_number = 0;
|
||||
rotate_angle = 0;
|
||||
generated = 0;
|
||||
my_symbol = ZBarcode_Create();
|
||||
my_symbol->input_mode = UNICODE_MODE;
|
||||
|
||||
if(argc == 1) {
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while(1) {
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
{"help", 0, 0, 'h'},
|
||||
{"types", 0, 0, 't'},
|
||||
{"bind", 0, 0, 0},
|
||||
{"box", 0, 0, 0},
|
||||
{"directeps", 0, 0, 0},
|
||||
{"directpng", 0, 0, 0},
|
||||
{"directsvg", 0, 0, 0},
|
||||
{"barcode", 1, 0, 'b'},
|
||||
{"height", 1, 0, 0},
|
||||
{"whitesp", 1, 0, 'w'},
|
||||
{"border", 1, 0, 0},
|
||||
{"data", 1, 0, 'd'},
|
||||
{"output", 1, 0, 'o'},
|
||||
{"input", 1, 0, 'i'},
|
||||
{"fg", 1, 0, 0},
|
||||
{"bg", 1, 0, 0},
|
||||
{"cols", 1, 0, 0},
|
||||
{"vers", 1, 0, 0},
|
||||
{"rotate", 1, 0, 0},
|
||||
{"secure", 1, 0, 0},
|
||||
{"reverse", 1, 0, 'r'},
|
||||
{"mode", 1, 0, 0},
|
||||
{"primary", 1, 0, 0},
|
||||
{"scale", 1, 0, 0},
|
||||
{"gs1", 0, 0, 0},
|
||||
{"kanji", 0, 0, 0},
|
||||
{"sjis", 0, 0, 0},
|
||||
{"binary", 0, 0, 0},
|
||||
{"notext", 0, 0, 0},
|
||||
{"square", 0, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index);
|
||||
if(c == -1) break;
|
||||
|
||||
switch(c) {
|
||||
case 0:
|
||||
if(!strcmp(long_options[option_index].name, "bind")) {
|
||||
my_symbol->output_options += BARCODE_BIND;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "box")) {
|
||||
my_symbol->output_options += BARCODE_BOX;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "directeps")) {
|
||||
my_symbol->output_options += BARCODE_STDOUT;
|
||||
strncpy(my_symbol->outfile, "dummy.eps", 10);
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "directpng")) {
|
||||
my_symbol->output_options += BARCODE_STDOUT;
|
||||
strncpy(my_symbol->outfile, "dummy.png", 10);
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "directsvg")) {
|
||||
my_symbol->output_options += BARCODE_STDOUT;
|
||||
strncpy(my_symbol->outfile, "dummy.svg", 10);
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "gs1")) {
|
||||
my_symbol->input_mode = GS1_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "kanji")) {
|
||||
my_symbol->input_mode = KANJI_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "sjis")) {
|
||||
my_symbol->input_mode = SJIS_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "binary")) {
|
||||
my_symbol->input_mode = DATA_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "fg")) {
|
||||
strncpy(my_symbol->fgcolour, optarg, 7);
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "bg")) {
|
||||
strncpy(my_symbol->bgcolour, optarg, 7);
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "notext")) {
|
||||
my_symbol->show_hrt = 0;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "square")) {
|
||||
my_symbol->option_3 = DM_SQUARE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "scale")) {
|
||||
my_symbol->scale = (float)(atof(optarg));
|
||||
if(my_symbol->scale < 0.01) {
|
||||
/* Zero and negative values are not permitted */
|
||||
fprintf(stderr, "Invalid scale value\n");
|
||||
my_symbol->scale = 1.0;
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "border")) {
|
||||
error_number = validator(NESET, optarg);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
fprintf(stderr, "Invalid border width\n");
|
||||
exit(1);
|
||||
}
|
||||
if((atoi(optarg) >= 0) && (atoi(optarg) <= 1000)) {
|
||||
my_symbol->border_width = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Border width out of range\n");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "height")) {
|
||||
error_number = validator(NESET, optarg);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
fprintf(stderr, "Invalid symbol height\n");
|
||||
exit(1);
|
||||
}
|
||||
if((atoi(optarg) >= 1) && (atoi(optarg) <= 1000)) {
|
||||
my_symbol->height = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Symbol height out of range\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(!strcmp(long_options[option_index].name, "cols")) {
|
||||
if((atoi(optarg) >= 1) && (atoi(optarg) <= 30)) {
|
||||
my_symbol->option_2 = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Number of columns out of range\n");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "vers")) {
|
||||
if((atoi(optarg) >= 1) && (atoi(optarg) <= 40)) {
|
||||
my_symbol->option_2 = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Invalid QR Code version\n");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "secure")) {
|
||||
if((atoi(optarg) >= 1) && (atoi(optarg) <= 8)) {
|
||||
my_symbol->option_1 = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "ECC level out of range\n");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "primary")) {
|
||||
if(strlen(optarg) <= 90) {
|
||||
strcpy(my_symbol->primary, optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Primary data string too long");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "mode")) {
|
||||
/* Don't allow specification of modes 2 and 3 - do it
|
||||
automagically instead */
|
||||
if((optarg[0] >= '0') && (optarg[0] <= '6')) {
|
||||
my_symbol->option_1 = optarg[0] - '0';
|
||||
} else {
|
||||
fprintf(stderr, "Invalid mode\n");
|
||||
}
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "rotate")) {
|
||||
/* Only certain inputs allowed */
|
||||
error_number = validator(NESET, optarg);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
fprintf(stderr, "Invalid rotation parameter\n");
|
||||
exit(1);
|
||||
}
|
||||
switch(atoi(optarg)) {
|
||||
case 90: rotate_angle = 90; break;
|
||||
case 180: rotate_angle = 180; break;
|
||||
case 270: rotate_angle = 270; break;
|
||||
default: rotate_angle = 0; break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
break;
|
||||
|
||||
case 't':
|
||||
types();
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
error_number = validator(NESET, optarg);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
fprintf(stderr, "Invalid barcode type\n");
|
||||
exit(1);
|
||||
}
|
||||
my_symbol->symbology = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
error_number = validator(NESET, optarg);
|
||||
if(error_number == ERROR_INVALID_DATA) {
|
||||
fprintf(stderr, "Invalid whitespace value\n");
|
||||
exit(1);
|
||||
}
|
||||
if((atoi(optarg) >= 0) && (atoi(optarg) <= 1000)) {
|
||||
my_symbol->whitespace_width = atoi(optarg);
|
||||
} else {
|
||||
fprintf(stderr, "Whitespace value out of range");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd': /* we have some data! */
|
||||
error_number = ZBarcode_Encode(my_symbol, (unsigned char*)optarg, strlen(optarg));
|
||||
if(error_number == 0) {
|
||||
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
||||
}
|
||||
generated = 1;
|
||||
if(error_number != 0) {
|
||||
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||
ZBarcode_Delete(my_symbol);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'i': /* Take data from file */
|
||||
error_number = ZBarcode_Encode_File(my_symbol, optarg);
|
||||
if(error_number == 0) {
|
||||
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
||||
}
|
||||
generated = 1;
|
||||
if(error_number != 0) {
|
||||
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||
ZBarcode_Delete(my_symbol);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
strncpy(my_symbol->outfile, optarg, 250);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
strcpy(my_symbol->fgcolour, "ffffff");
|
||||
strcpy(my_symbol->bgcolour, "000000");
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "?? getopt error 0%o\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc) {
|
||||
fprintf(stderr, "Invalid option ");
|
||||
while (optind < argc)
|
||||
fprintf(stderr, "%s", argv[optind++]);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
if(generated == 0) {
|
||||
fprintf(stderr, "error: No data received, no symbol generated\n");
|
||||
}
|
||||
|
||||
ZBarcode_Delete(my_symbol);
|
||||
|
||||
return error_number;
|
||||
}
|
423
frontend/test.sh
Executable file
423
frontend/test.sh
Executable file
@ -0,0 +1,423 @@
|
||||
echo testing Code 11
|
||||
zint -o bar01.png -b 1 --height=50 --border=10 -d 87654321
|
||||
zint -o bar01.eps -b 1 --height=50 --border=10 -d 87654321
|
||||
zint -o bar01.svg -b 1 --height=50 --border=10 -d 87654321
|
||||
echo testing Code 2 of 5 Standard
|
||||
zint -o bar02.png -b 2 --height=50 --border=10 -d 87654321
|
||||
zint -o bar02.eps -b 2 --height=50 --border=10 -d 87654321
|
||||
zint -o bar02.svg -b 2 --height=50 --border=10 -d 87654321
|
||||
echo testing Interleaved 2 of 5
|
||||
zint -o bar03.png -b 3 --height=50 --border=10 -d 87654321
|
||||
zint -o bar03.eps -b 3 --height=50 --border=10 -d 87654321
|
||||
zint -o bar03.svg -b 3 --height=50 --border=10 -d 87654321
|
||||
echo testing Code 2 of 5 IATA
|
||||
zint -o bar04.png -b 4 --height=50 --border=10 -d 87654321
|
||||
zint -o bar04.eps -b 4 --height=50 --border=10 -d 87654321
|
||||
zint -o bar04.svg -b 4 --height=50 --border=10 -d 87654321
|
||||
echo testing Code 2 of 5 Data Logic
|
||||
zint -o bar06.png -b 6 --height=50 --border=10 -d 87654321
|
||||
zint -o bar06.eps -b 6 --height=50 --border=10 -d 87654321
|
||||
zint -o bar06.svg -b 6 --height=50 --border=10 -d 87654321
|
||||
echo testing Code 2 of 5 Industrial
|
||||
zint -o bar07.png -b 7 --height=50 --border=10 -d 87654321
|
||||
zint -o bar07.eps -b 7 --height=50 --border=10 -d 87654321
|
||||
zint -o bar07.svg -b 7 --height=50 --border=10 -d 87654321
|
||||
echo testing Code 39
|
||||
zint -o bar08.png -b 8 --height=50 --border=10 -d CODE39
|
||||
zint -o bar08.eps -b 8 --height=50 --border=10 -d CODE39
|
||||
zint -o bar08.svg -b 8 --height=50 --border=10 -d CODE39
|
||||
echo testing Extended Code 39
|
||||
zint -o bar09.png -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.eps -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.svg -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
echo testing EAN8
|
||||
zint -o bar10.png -b 13 --height=50 --border=10 -d 7654321
|
||||
zint -o bar10.eps -b 13 --height=50 --border=10 -d 7654321
|
||||
zint -o bar10.svg -b 13 --height=50 --border=10 -d 7654321
|
||||
echo testing EAN8 - 2 digits add on
|
||||
zint -o bar11.png -b 13 --height=50 --border=10 -d 7654321+21
|
||||
zint -o bar11.eps -b 13 --height=50 --border=10 -d 7654321+21
|
||||
zint -o bar11.svg -b 13 --height=50 --border=10 -d 7654321+21
|
||||
echo testing EAN8 - 5 digits add-on
|
||||
zint -o bar12.png -b 13 --height=50 --border=10 -d 7654321+54321
|
||||
zint -o bar12.eps -b 13 --height=50 --border=10 -d 7654321+54321
|
||||
zint -o bar12.svg -b 13 --height=50 --border=10 -d 7654321+54321
|
||||
echo testing EAN13
|
||||
zint -o bar13.png -b 13 --height=50 --border=10 -d 210987654321
|
||||
zint -o bar13.eps -b 13 --height=50 --border=10 -d 210987654321
|
||||
zint -o bar13.svg -b 13 --height=50 --border=10 -d 210987654321
|
||||
echo testing EAN13 - 2 digits add-on
|
||||
zint -o bar14.png -b 13 --height=50 --border=10 -d 210987654321+21
|
||||
zint -o bar14.eps -b 13 --height=50 --border=10 -d 210987654321+21
|
||||
zint -o bar14.svg -b 13 --height=50 --border=10 -d 210987654321+21
|
||||
echo testing EAN13 - 5 digits add-on
|
||||
zint -o bar15.png -b 13 --height=50 --border=10 -d 210987654321+54321
|
||||
zint -o bar15.eps -b 13 --height=50 --border=10 -d 210987654321+54321
|
||||
zint -o bar15.svg -b 13 --height=50 --border=10 -d 210987654321+54321
|
||||
echo testing GS1-128
|
||||
zint -o bar16.png -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
zint -o bar16.eps -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
zint -o bar16.svg -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
echo testing CodaBar
|
||||
zint -o bar18.png -b 18 --height=50 --border=10 -d D765432C
|
||||
zint -o bar18.eps -b 18 --height=50 --border=10 -d D765432C
|
||||
zint -o bar18.svg -b 18 --height=50 --border=10 -d D765432C
|
||||
echo testing Code 128
|
||||
zint -o bar20.png -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.eps -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.svg -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
echo testing Deutsche Post Leitcode
|
||||
zint -o bar21.png -b 21 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar21.eps -b 21 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar21.svg -b 21 --height=50 --border=10 -d 3210987654321
|
||||
echo testing Deutsche Post Identcode
|
||||
zint -o bar22.png -b 22 --height=50 --border=10 -d 10987654321
|
||||
zint -o bar22.eps -b 22 --height=50 --border=10 -d 10987654321
|
||||
zint -o bar22.svg -b 22 --height=50 --border=10 -d 10987654321
|
||||
echo testing Code 16k
|
||||
zint -o bar23.png -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint"
|
||||
zint -o bar23.eps -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint"
|
||||
zint -o bar23.svg -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint"
|
||||
zint -o bar23a.png -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar23a.eps -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar23a.svg -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
echo testing Code 49
|
||||
zint -o bar24.png -b 24 -d "Demonstration Code 49"
|
||||
zint -o bar24.eps -b 24 -d "Demonstration Code 49"
|
||||
zint -o bar24.svg -b 24 -d "Demonstration Code 49"
|
||||
echo testing Code 93
|
||||
zint -o bar25.png -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.eps -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.svg -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
echo testing Flattermarken
|
||||
zint -o bar28.png -b 28 --height=50 --border=10 -d 87654321
|
||||
zint -o bar28.eps -b 28 --height=50 --border=10 -d 87654321
|
||||
zint -o bar28.svg -b 28 --height=50 --border=10 -d 87654321
|
||||
echo testing DataBar-14
|
||||
zint -o bar29.png -b 29 --height=33 --border=10 -d 2001234567890
|
||||
zint -o bar29.eps -b 29 --height=33 --border=10 -d 2001234567890
|
||||
zint -o bar29.svg -b 29 --height=33 --border=10 -d 2001234567890
|
||||
echo testing DataBar Limited
|
||||
zint -o bar30.png -b 30 --height=50 --border=10 -w 2 -d 31234567890
|
||||
zint -o bar30.eps -b 30 --height=50 --border=10 -w 2 -d 31234567890
|
||||
zint -o bar30.svg -b 30 --height=50 --border=10 -w 2 -d 31234567890
|
||||
echo testing DataBar Expanded
|
||||
zint -o bar31.png -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
zint -o bar31.eps -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
zint -o bar31.svg -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
echo testing Telepen Alpha
|
||||
zint -o bar32.png -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.eps -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.svg -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
echo testing UPC A
|
||||
zint -o bar34.png -b 34 --height=50 --border=10 -d 10987654321
|
||||
zint -o bar34.eps -b 34 --height=50 --border=10 -d 10987654321
|
||||
zint -o bar34.svg -b 34 --height=50 --border=10 -d 10987654321
|
||||
echo testing UPC A - 2 digit add-on
|
||||
zint -o bar35.png -b 34 --height=50 --border=10 -d 10987654321+21
|
||||
zint -o bar35.eps -b 34 --height=50 --border=10 -d 10987654321+21
|
||||
zint -o bar35.svg -b 34 --height=50 --border=10 -d 10987654321+21
|
||||
echo testing UPC A - 5 digit add-on
|
||||
zint -o bar36.png -b 36 --height=50 --border=10 -d 10987654321+54321
|
||||
zint -o bar36.eps -b 36 --height=50 --border=10 -d 10987654321+54321
|
||||
zint -o bar36.svg -b 36 --height=50 --border=10 -d 10987654321+54321
|
||||
echo testing UPC E
|
||||
zint -o bar37.png -b 37 --height=50 --border=10 -d 654321
|
||||
zint -o bar37.eps -b 37 --height=50 --border=10 -d 654321
|
||||
zint -o bar37.svg -b 37 --height=50 --border=10 -d 654321
|
||||
echo testing UPC E - 2 digit add-on
|
||||
zint -o bar38.png -b 37 --height=50 --border=10 -d 654321+21
|
||||
zint -o bar38.eps -b 37 --height=50 --border=10 -d 654321+21
|
||||
zint -o bar38.svg -b 37 --height=50 --border=10 -d 654321+21
|
||||
echo testing UPC E - 5 digit add-on
|
||||
zint -o bar39.png -b 37 --height=50 --border=10 -d 654321+54321
|
||||
zint -o bar39.eps -b 37 --height=50 --border=10 -d 654321+54321
|
||||
zint -o bar39.svg -b 37 --height=50 --border=10 -d 654321+54321
|
||||
echo testing PostNet-6
|
||||
zint -o bar41.png -b 40 --border=10 -d 54321
|
||||
zint -o bar41.eps -b 40 --border=10 -d 54321
|
||||
zint -o bar41.svg -b 40 --border=10 -d 54321
|
||||
echo testing PostNet-10
|
||||
zint -o bar43.png -b 40 --border=10 -d 987654321
|
||||
zint -o bar43.eps -b 40 --border=10 -d 987654321
|
||||
zint -o bar43.svg -b 40 --border=10 -d 987654321
|
||||
echo testing PostNet-12
|
||||
zint -o bar45.png -b 40 --border=10 -d 10987654321
|
||||
zint -o bar45.eps -b 40 --border=10 -d 10987654321
|
||||
zint -o bar45.svg -b 40 --border=10 -d 10987654321
|
||||
echo testing MSI Code
|
||||
zint -o bar47.png -b 47 --height=50 --border=10 -d 87654321
|
||||
zint -o bar47.eps -b 47 --height=50 --border=10 -d 87654321
|
||||
zint -o bar47.svg -b 47 --height=50 --border=10 -d 87654321
|
||||
echo testing FIM
|
||||
zint -o bar49.png -b 49 --height=50 --border=10 -d D
|
||||
zint -o bar49.eps -b 49 --height=50 --border=10 -d D
|
||||
zint -o bar49.svg -b 49 --height=50 --border=10 -d D
|
||||
echo testing LOGMARS
|
||||
zint -o bar50.png -b 50 --height=50 --border=10 -d LOGMARS
|
||||
zint -o bar50.eps -b 50 --height=50 --border=10 -d LOGMARS
|
||||
zint -o bar50.svg -b 50 --height=50 --border=10 -d LOGMARS
|
||||
echo testing Pharmacode One-Track
|
||||
zint -o bar51.png -b 51 --height=50 --border=10 -d 123456
|
||||
zint -o bar51.eps -b 51 --height=50 --border=10 -d 123456
|
||||
zint -o bar51.svg -b 51 --height=50 --border=10 -d 123456
|
||||
echo testing Pharmazentralnumber
|
||||
zint -o bar52.png -b 52 --height=50 --border=10 -d 654321
|
||||
zint -o bar52.eps -b 52 --height=50 --border=10 -d 654321
|
||||
zint -o bar52.svg -b 52 --height=50 --border=10 -d 654321
|
||||
echo testing Pharmacode Two-Track
|
||||
zint -o bar53.png -b 53 --height=50 --border=10 -d 12345678
|
||||
zint -o bar53.eps -b 53 --height=50 --border=10 -d 12345678
|
||||
zint -o bar53.svg -b 53 --height=50 --border=10 -d 12345678
|
||||
echo testing PDF417
|
||||
zint -o bar55.png -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
zint -o bar55.eps -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
zint -o bar55.svg -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
echo testing PDF417 Truncated
|
||||
zint -o bar56.png -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
zint -o bar56.eps -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
zint -o bar56.svg -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint"
|
||||
echo testing Maxicode
|
||||
zint -o bar57.png -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint"
|
||||
zint -o bar57.eps -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint"
|
||||
zint -o bar57.svg -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint"
|
||||
echo testing QR Code
|
||||
zint -o bar58.png -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.eps -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58k.png -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.eps -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.svg -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
echo testing Code 128 Subset B
|
||||
zint -o bar60.png -b 60 --height=50 --border=10 -d 87654321
|
||||
zint -o bar60.eps -b 60 --height=50 --border=10 -d 87654321
|
||||
zint -o bar60.svg -b 60 --height=50 --border=10 -d 87654321
|
||||
echo testing Australian Post Standard Customer
|
||||
zint -o bar63.png -b 63 --border=10 -d 87654321
|
||||
zint -o bar63.eps -b 63 --border=10 -d 87654321
|
||||
zint -o bar63.svg -b 63 --border=10 -d 87654321
|
||||
echo testing Australian Post Customer 2
|
||||
zint -o bar64.png -b 63 --border=10 -d 87654321AUSPS
|
||||
zint -o bar64.eps -b 63 --border=10 -d 87654321AUSPS
|
||||
zint -o bar64.svg -b 63 --border=10 -d 87654321AUSPS
|
||||
echo testing Australian Post Customer 3
|
||||
zint -o bar65.png -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.eps -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.svg -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
echo testing Australian Post Reply Paid
|
||||
zint -o bar66.png -b 66 --border=10 -d 87654321
|
||||
zint -o bar66.eps -b 66 --border=10 -d 87654321
|
||||
zint -o bar66.svg -b 66 --border=10 -d 87654321
|
||||
echo testing Australian Post Routing
|
||||
zint -o bar67.png -b 67 --border=10 -d 87654321
|
||||
zint -o bar67.eps -b 67 --border=10 -d 87654321
|
||||
zint -o bar67.svg -b 67 --border=10 -d 87654321
|
||||
echo testing Australian Post Redirection
|
||||
zint -o bar68.png -b 68 --border=10 -d 87654321
|
||||
zint -o bar68.eps -b 68 --border=10 -d 87654321
|
||||
zint -o bar68.svg -b 68 --border=10 -d 87654321
|
||||
echo testing ISBN Code
|
||||
zint -o bar69.png -b 69 --height=50 --border=10 -d 0333638514
|
||||
zint -o bar69.eps -b 69 --height=50 --border=10 -d 0333638514
|
||||
zint -o bar69.svg -b 69 --height=50 --border=10 -d 0333638514
|
||||
echo testing Royal Mail 4 State
|
||||
zint -o bar70.png -b 70 --border=10 -d ROYALMAIL
|
||||
zint -o bar70.eps -b 70 --border=10 -d ROYALMAIL
|
||||
zint -o bar70.svg -b 70 --border=10 -d ROYALMAIL
|
||||
echo testing Data Matrix
|
||||
zint -o bar71.png -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
zint -o bar71.eps -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
zint -o bar71.svg -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
zint -o bar71a.png -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar71a.eps -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar71a.svg -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
echo testing Data Matrix ECC 050
|
||||
zint -o bar71b.png --mode=3 -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
zint -o bar71b.eps --mode=3 -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
zint -o bar71b.svg --mode=3 -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint"
|
||||
echo testing EAN-14
|
||||
zint -o bar72.png -b 72 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar72.eps -b 72 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar72.svg -b 72 --height=50 --border=10 -d 3210987654321
|
||||
echo testing NVE-18
|
||||
zint -o bar75.png -b 75 --height=50 --border=10 -d 76543210987654321
|
||||
zint -o bar75.eps -b 75 --height=50 --border=10 -d 76543210987654321
|
||||
zint -o bar75.svg -b 75 --height=50 --border=10 -d 76543210987654321
|
||||
echo testing Japanese Post
|
||||
zint -o bar76.png -b 76 --border=10 -d "10000131-3-2-503"
|
||||
zint -o bar76.eps -b 76 --border=10 -d "10000131-3-2-503"
|
||||
zint -o bar76.svg -b 76 --border=10 -d "10000131-3-2-503"
|
||||
echo testing Korea Post
|
||||
zint -o bar77.png -b 77 --height=50 --border=10 -d 123456
|
||||
zint -o bar77.eps -b 77 --height=50 --border=10 -d 123456
|
||||
zint -o bar77.svg -b 77 --height=50 --border=10 -d 123456
|
||||
echo testing DataBar Truncated
|
||||
zint -o bar78.png -b 29 --height=13 --border=10 -d 1234567890
|
||||
zint -o bar78.eps -b 29 --height=13 --border=10 -d 1234567890
|
||||
zint -o bar78.svg -b 29 --height=13 --border=10 -d 1234567890
|
||||
echo testing DataBar Stacked
|
||||
zint -o bar79.png -b 79 --border=10 -d 1234567890
|
||||
zint -o bar79.eps -b 79 --border=10 -d 1234567890
|
||||
zint -o bar79.svg -b 79 --border=10 -d 1234567890
|
||||
echo testing DataBar Stacked Omnidirectional
|
||||
zint -o bar80.png -b 80 --height=69 --border=10 -d 3456789012
|
||||
zint -o bar80.eps -b 80 --height=69 --border=10 -d 3456789012
|
||||
zint -o bar80.svg -b 80 --height=69 --border=10 -d 3456789012
|
||||
echo testing DataBar Expanded Stacked
|
||||
zint -o bar81.png -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
zint -o bar81.eps -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
zint -o bar81.svg -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231"
|
||||
echo testing Planet 12 Digit
|
||||
zint -o bar82.png -b 82 --border=10 -d 10987654321
|
||||
zint -o bar82.eps -b 82 --border=10 -d 10987654321
|
||||
zint -o bar82.svg -b 82 --border=10 -d 10987654321
|
||||
echo testing Planet 14 Digit
|
||||
zint -o bar83.png -b 82 --border=10 -d 3210987654321
|
||||
zint -o bar83.eps -b 82 --border=10 -d 3210987654321
|
||||
zint -o bar83.svg -b 82 --border=10 -d 3210987654321
|
||||
echo testing Micro PDF417
|
||||
zint -o bar84.png -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
zint -o bar84.eps -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
zint -o bar84.svg -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
echo testing USPS OneCode 4-State Customer Barcode
|
||||
zint -o bar85.png -b 85 --border=10 -d 01234567094987654321
|
||||
zint -o bar85.eps -b 85 --border=10 -d 01234567094987654321
|
||||
zint -o bar85.svg -b 85 --border=10 -d 01234567094987654321
|
||||
echo testing Plessey Code with bidirectional reading support
|
||||
zint -o bar86.png -b 86 --height=50 --border=10 -d 87654321
|
||||
zint -o bar86.eps -b 86 --height=50 --border=10 -d 87654321
|
||||
zint -o bar86.svg -b 86 --height=50 --border=10 -d 87654321
|
||||
echo testing Telepen Numeric
|
||||
zint -o bar87.png -b 87 --height=50 --border=10 -d 87654321
|
||||
zint -o bar87.eps -b 87 --height=50 --border=10 -d 87654321
|
||||
zint -o bar87.svg -b 87 --height=50 --border=10 -d 87654321
|
||||
echo testing ITF-14
|
||||
zint -o bar89.png -b 89 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar89.eps -b 89 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar89.svg -b 89 --height=50 --border=10 -d 3210987654321
|
||||
echo testing KIX Code
|
||||
zint -o bar90.png -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.eps -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.svg -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
echo testing Aztec Code
|
||||
zint -o bar92.png -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
zint -o bar92.eps -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
zint -o bar92.svg -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
zint -o bar92a.png -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar92a.eps -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
zint -o bar92a.svg -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231"
|
||||
echo testing DAFT Code
|
||||
zint -o bar93.png -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft"
|
||||
zint -o bar93.eps -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft"
|
||||
zint -o bar93.svg -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft"
|
||||
echo testing Micro QR Code
|
||||
zint -o bar97.png -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97.eps -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97k.png -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.eps -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.svg -b 97 --kanji --border=10 -d "小さい"
|
||||
echo testing HIBC LIC 128
|
||||
zint -o bar98.png -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar98.eps -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar98.svg -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing HIBC LIC 39
|
||||
zint -o bar99.png -b 99 --border=10 -d "A123BJC5D6E71"
|
||||
zint -o bar99.eps -b 99 --border=10 -d "A123BJC5D6E71"
|
||||
zint -o bar99.svg -b 99 --border=10 -d "A123BJC5D6E71"
|
||||
echo testing HIBC LIC Data Matrix
|
||||
zint -o bar102.png -b 102 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar102.eps -b 102 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar102.svg -b 102 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing HIBC LIC QR-Code
|
||||
zint -o bar104.png -b 104 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar104.eps -b 104 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar104.svg -b 104 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing HIBC LIC PDF417
|
||||
zint -o bar106.png -b 106 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar106.eps -b 106 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar106.svg -b 106 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing HIBC LIC MicroPDF417
|
||||
zint -o bar108.png -b 108 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar108.eps -b 108 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar108.svg -b 108 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing HIBC LIC Aztec Code
|
||||
zint -o bar112.png -b 112 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar112.eps -b 112 --border=10 -d "A99912345/9901510X3"
|
||||
zint -o bar112.svg -b 112 --border=10 -d "A99912345/9901510X3"
|
||||
echo testing Aztec Runes
|
||||
zint -o bar128.png -b 128 --border=10 -d 125
|
||||
zint -o bar128.eps -b 128 --border=10 -d 125
|
||||
zint -o bar128.svg -b 128 --border=10 -d 125
|
||||
echo testing Code 23
|
||||
zint -o bar129.png -b 129 --border=10 -d "12345678"
|
||||
zint -o bar129.eps -b 129 --border=10 -d "12345678"
|
||||
zint -o bar129.svg -b 129 --border=10 -d "12345678"
|
||||
echo testing EAN-8 Composite with CC-A
|
||||
zint -o bar130.png -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678"
|
||||
zint -o bar130.eps -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678"
|
||||
zint -o bar130.svg -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678"
|
||||
echo testing EAN-13 Composite with CC-A
|
||||
zint -o bar130a.png -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd"
|
||||
zint -o bar130a.eps -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd"
|
||||
zint -o bar130a.svg -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd"
|
||||
echo testing UCC/EAN-128 Composite with CC-A
|
||||
zint -o bar131.png -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG"
|
||||
zint -o bar131.eps -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG"
|
||||
zint -o bar131.svg -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG"
|
||||
echo testing UCC/EAN-128 Composite with CC-C
|
||||
zint -o bar131a.png -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG"
|
||||
zint -o bar131a.eps -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG"
|
||||
zint -o bar131a.svg -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG"
|
||||
echo testing DataBar-14 Composite with CC-A
|
||||
zint -o bar132.png -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o bar132.eps -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o bar132.svg -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
echo testing DataBar Limited Composite with CC-B
|
||||
zint -o bar133.png -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.eps -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
echo testing DataBar Expanded Composite with CC-A
|
||||
zint -o bar134.png -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o bar134.eps -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o bar134.svg -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
echo testing UPC-A Composite with CC-A
|
||||
zint -o bar135.png -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231"
|
||||
zint -o bar135.eps -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231"
|
||||
zint -o bar135.svg -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231"
|
||||
echo testing UPC-E Composite with CC-A
|
||||
zint -o bar136.png -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231"
|
||||
zint -o bar136.eps -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231"
|
||||
zint -o bar136.svg -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231"
|
||||
echo testing DataBar-14 Stacked Composite with CC-A
|
||||
zint -o bar137.png -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o bar137.eps -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o bar137.svg -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
echo testing DataBar-14 Stacked Omnidirectional Composite with CC-A
|
||||
zint -o bar138.png -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o bar138.eps -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o bar138.svg -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
echo testing DataBar Expanded Stacked Composite with CC-A
|
||||
zint -o bar139.png -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678"
|
||||
zint -o bar139.eps -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678"
|
||||
zint -o bar139.svg -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678"
|
||||
echo testing Channel Code
|
||||
zint -o bar140.png -b 140 --height=100 --border=10 -d "12345"
|
||||
zint -o bar140.eps -b 140 --height=100 --border=10 -d "12345"
|
||||
zint -o bar140.svg -b 140 --height=100 --border=10 -d "12345"
|
||||
echo testing Code One
|
||||
zint -o bar141.png -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint"
|
||||
zint -o bar141.eps -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint"
|
||||
zint -o bar141.svg -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint"
|
||||
echo testing Grid Matrix
|
||||
zint -o bar142.png -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint"
|
||||
zint -o bar142.eps -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint"
|
||||
zint -o bar142.svg -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint"
|
||||
echo testing PNG rotation
|
||||
zint -o barrot0.png -b 130 --height=50 --border=10 --mode=1 --rotate=0 --primary=331234567890+01234 -d "[99]1234-abcd"
|
||||
zint -o barrot90.png -b 130 --height=50 --border=10 --mode=1 --rotate=90 --primary=331234567890+01234 -d "[99]1234-abcd"
|
||||
zint -o barrot180.png -b 130 --height=50 --border=10 --mode=1 --rotate=180 --primary=331234567890+01234 -d "[99]1234-abcd"
|
||||
zint -o barrot270.png -b 130 --height=50 --border=10 --mode=1 --rotate=270 --primary=331234567890+01234 -d "[99]1234-abcd"
|
||||
echo testing Extended ASCII support
|
||||
zint -o barext.png --height=50 --border=10 -d "größer"
|
||||
zint -o barext.svg --height=50 --border=10 -d "größer"
|
85
frontend/zint.rc
Normal file
85
frontend/zint.rc
Normal file
@ -0,0 +1,85 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <winver.h>
|
||||
|
||||
|
||||
|
||||
#ifdef GCC_WINDRES
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
#else
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
#endif
|
||||
|
||||
FILEVERSION 2,3,0,0
|
||||
|
||||
PRODUCTVERSION 2,3,0,0
|
||||
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
||||
#else
|
||||
|
||||
FILEFLAGS 0
|
||||
|
||||
#endif
|
||||
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
|
||||
FILETYPE VFT_APP
|
||||
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
|
||||
BEGIN
|
||||
|
||||
BLOCK "StringFileInfo"
|
||||
|
||||
BEGIN
|
||||
|
||||
BLOCK "040904E4"
|
||||
|
||||
//language ID = U.S. English, char set = Windows, Multilingual
|
||||
|
||||
BEGIN
|
||||
|
||||
VALUE "FileDescription", "zint barcode generator\0"
|
||||
|
||||
VALUE "FileVersion", "2.3.0.0\0"
|
||||
|
||||
VALUE "InternalName", "zint.exe\0"
|
||||
|
||||
VALUE "LegalCopyright", "Copyright <20> 2009 Robin Stuart & BogDan Vatra\0"
|
||||
|
||||
VALUE "OriginalFilename", "zint.exe\0"
|
||||
|
||||
VALUE "ProductName", "zint\0"
|
||||
|
||||
VALUE "ProductVersion", "2.3.0.0\0"
|
||||
|
||||
VALUE "License", "GNU General Public License version 3\0"
|
||||
|
||||
VALUE "WWW", "http://www.sourceforge.net/projects/zint\0"
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
BEGIN
|
||||
|
||||
VALUE "Translation", 0x0409, 1250
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "zint_black.ico"
|
BIN
frontend/zint_black.ico
Normal file
BIN
frontend/zint_black.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user