NULL character support

This commit is contained in:
hooper114 2009-01-02 21:09:16 +00:00
parent 1015a11b5a
commit d6df698918
20 changed files with 2286 additions and 1849 deletions

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
<TITLE>Using the API</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
<META NAME="CREATED" CONTENT="20070730;21081900">
<META NAME="CHANGED" CONTENT="20081109;9211000">
<META NAME="CHANGED" CONTENT="20090101;16002700">
<STYLE TYPE="text/css">
<!--
TD P { color: #000000 }
@ -92,8 +92,7 @@ char **argv)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;struct zint_symbol
ZBarcode_Create();<BR>&nbsp;&nbsp;&nbsp;&nbsp;ZBarcode_Encode_and_Print(my_symbol,
argv[1]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;ZBarcode_Delete(my_symbol);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return
0;<BR>}</FONT></FONT></P>
<P><BR><BR>
</P>
<P>Input strings should be Unicode formatted.</P>
<P><A NAME="OPTIONS"></A><FONT SIZE=5><B>4.3 Setting Options</B></FONT></P>
<P>So far our application is not very useful unless we plan to only
make Code 128 barcodes and we don't mind that they only save to
@ -270,6 +269,34 @@ structure consists of the following variables:</P>
<P ALIGN=CENTER>(automatic)</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=151>
<P ALIGN=CENTER><FONT FACE="Courier">scale</FONT></P>
</TD>
<TD WIDTH=162>
<P ALIGN=CENTER>float</P>
</TD>
<TD WIDTH=334>
<P ALIGN=CENTER>Scale factor for adjusting size of image.</P>
</TD>
<TD WIDTH=175>
<P ALIGN=CENTER>1.0</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=151>
<P ALIGN=CENTER><FONT FACE="Courier">nullchar</FONT></P>
</TD>
<TD WIDTH=162>
<P ALIGN=CENTER>char</P>
</TD>
<TD WIDTH=334>
<P ALIGN=CENTER>Character to substitute for NULL</P>
</TD>
<TD WIDTH=175>
<P ALIGN=CENTER>NULL</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=151>
<P ALIGN=CENTER><FONT FACE="Courier">primary</FONT></P>
@ -1026,6 +1053,17 @@ following table. For example</P>
<P ALIGN=CENTER>NVE-18</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=150>
<P ALIGN=CENTER>77</P>
</TD>
<TD WIDTH=382>
<P ALIGN=CENTER><FONT FACE="Courier, monospace">BARCODE_KOREAPOST</FONT></P>
</TD>
<TD WIDTH=366>
<P ALIGN=CENTER>Korea Post</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=150>
<P ALIGN=CENTER>79</P>

View file

@ -42,7 +42,8 @@ describes how to encode data using the command line front end
program.</P>
<P><BR><BR>
</P>
<H1><A NAME="INPUT"></A><FONT SIZE=5><B>3.1 Inputting data</B></FONT></H1>
<P><A NAME="INPUT"></A><FONT SIZE=5><B>3.1 Inputting data</B></FONT>
</P>
<P STYLE="font-style: normal">The data to encode can be entered at
the command line using the -d option, for example:</P>
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
@ -64,6 +65,9 @@ here.png. If an encapsulated Post Script file is needed simply append
the file name with .eps:</P>
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
-o there.eps -d 'This Text'</FONT></FONT></P>
<P>Output can also be directed to stdout using the --<FONT FACE="Courier, monospace">directeps</FONT>
and --<FONT FACE="Courier, monospace">directpng</FONT> switches for
EPS and PNG output respectively.</P>
<P><BR><BR>
</P>
<P STYLE="font-style: normal"><A NAME="BARTYPE"></A><FONT SIZE=5><B>3.3
@ -449,6 +453,14 @@ appropriate integer value in the following table.</P>
<P ALIGN=CENTER>NVE-18</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=139>
<P ALIGN=CENTER>77</P>
</TD>
<TD WIDTH=643>
<P ALIGN=CENTER>Korea Post</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=139>
<P ALIGN=CENTER>79</P>
@ -758,27 +770,23 @@ is only available with PNG output.</FONT></P>
<COL WIDTH=480>
<TR VALIGN=TOP>
<TD WIDTH=501>
<P ALIGN=CENTER><IMG SRC="bar38n.png" NAME="graphics5" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0><BR><BR><BR>
</P>
<P ALIGN=CENTER><FONT SIZE=3><FONT FACE="Courier, monospace">--rotate=0</FONT>
<P ALIGN=CENTER><IMG SRC="bar38n.png" NAME="graphics5" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0>
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=0</FONT></FONT><FONT SIZE=3>
(default)</FONT></P>
</TD>
<TD WIDTH=480>
<P ALIGN=CENTER><IMG SRC="bar38u.png" NAME="graphics6" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0><BR><BR><BR>
</P>
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=180</FONT></FONT></P>
<P ALIGN=CENTER><IMG SRC="bar38u.png" NAME="graphics6" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0>
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=180</FONT></FONT></P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=501>
<P ALIGN=CENTER><IMG SRC="bar38l.png" NAME="graphics7" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0><BR><BR><BR>
</P>
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=270</FONT></FONT></P>
<P ALIGN=CENTER><IMG SRC="bar38l.png" NAME="graphics7" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0>
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=270</FONT></FONT></P>
</TD>
<TD WIDTH=480>
<P ALIGN=CENTER><IMG SRC="bar38r.png" NAME="graphics8" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0><BR><BR><BR>
</P>
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=90</FONT></FONT></P>
<P ALIGN=CENTER><IMG SRC="bar38r.png" NAME="graphics8" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0>
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=90</FONT></FONT></P>
</TD>
</TR>
</TABLE>
@ -787,9 +795,29 @@ is only available with PNG output.</FONT></P>
</DL>
<P><BR><BR>
</P>
<P><BR><BR>
<P STYLE="font-style: normal"><A NAME="SCALE"></A><FONT SIZE=5><B>3.9
Adjusting image size</B></FONT></P>
<P STYLE="font-style: normal">The scale of the image can be altered
using the <FONT FACE="Courier, monospace">--scale=</FONT> option
followed by a multiple of the default x-dimension. For example for
PNG images a scale of 5 will increase the x-dimension to 10 pixels.
Note that Maxicode symbols output as PNG images cannot be scaled in
this way and that text added to a barcode in PNG images does not
change size.
</P>
<P STYLE="font-style: normal"><A NAME="OTHER"></A><FONT SIZE=5><B>3.9
<P STYLE="font-style: normal"><A NAME="NULL"></A><FONT SIZE=5><B>3.10
Handling NULL Characters</B></FONT></P>
<P STYLE="font-style: normal">Some symbologies support encoding of
the NULL character (ASCII 0) normally used to indicate the end of a
character string. To support this functionality the <FONT FACE="Courier, monospace">--null=</FONT>
option allows you to substitute another character for NULL. Enter the
decimal number for the character you wish to substitute. For example
<FONT FACE="Courier, monospace">--null=21</FONT> instructs Zint to
treat the NAK control character as a NULL character. Values between 1
and 128 are valid. This currently applies to Codablock-F, Code 128,
Code 16k, Extended Code 39, Code 93, Maxicode, PDF417, MicroPDF417
and Telepen.</P>
<P STYLE="font-style: normal"><A NAME="OTHER"></A><FONT SIZE=5><B>3.11
Other options</B></FONT></P>
<P STYLE="font-style: normal">Additional options are available which
are specific to certain symbologies. These may, for example, control

View file

@ -59,7 +59,11 @@ the barcode symbologies supported by them.</P>
</DT><DT>
3.8 <A HREF="frontend.html#ROTATE">Rotating the Symbol</A>
</DT><DT>
3.9 <A HREF="frontend.html#OTHER">Other Options</A>
3.9 <A HREF="frontend.html#SCALE">Adjusting Image Size</A>
</DT><DT>
3.10 <A HREF="frontend.html#NULL">Handling NULL Characters</A>
</DT><DT>
3.11 <A HREF="frontend.html#OTHER">Other Options</A>
</DT></DL>
<DT>
4. <A HREF="backend.html">Using the API</A>
@ -179,6 +183,8 @@ the barcode symbologies supported by them.</P>
Truncated</A></DT><DT>
5.1.12.2 <A HREF="onedim.html#RSSLTD">DataBar Limited</A></DT><DT>
5.1.12.3 <A HREF="onedim.html#RSSEXP">DataBar Expanded</A></DT></DL>
<DT>
5.1.13 <A HREF="onedim.html#KOREA">Korea Post</A></DT>
</DL>
<DT>
5.2 <A HREF="stacked.html">Stacked Symbologies</A>
@ -338,4 +344,4 @@ the barcode symbologies supported by them.</P>
<P><BR><BR>
</P>
</BODY>
</HTML>
</HTML>

View file

@ -5,7 +5,7 @@
<TITLE>Legal and Version Information</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
<META NAME="CREATED" CONTENT="20070730;21081900">
<META NAME="CHANGED" CONTENT="20081118;8481000">
<META NAME="CHANGED" CONTENT="20090101;17540500">
<STYLE TYPE="text/css">
<!--
TD P { color: #000000 }
@ -175,6 +175,12 @@ NVE-18, PZN, Data Matrix, Maxicode and QR Code)</P>
<P>v2.0 - Made corrections to Aztec Code and tested output with
bcTester. Added Aztec Runes, Micro QR Code and Data Matrix ECC
000-140. Updated e-mail information. 18/11/2008</P>
<P>v2.1 Reinstated Korea Post barcodes, harmonised bind and box
options, moved Unicode handling into backend, added size options to
Data Matrix, added NULL character handling for Codablock-F, Code 128,
Code 16k, Extended Code 39, Code 93, Telepen, Maxicode, PDF417 and
MicroPDF417. Added scale and direct to <FONT FACE="Courier, monospace">stdout</FONT>
options.</P>
<P><A NAME="CREDITS"></A><FONT SIZE=5><B>6.4 Sources of Information</B></FONT></P>
<P>Below is a list of some of the sources used in rough chronological
order:</P>

View file

@ -5,7 +5,7 @@
<TITLE>One-Dimensional Symbols</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
<META NAME="CREATED" CONTENT="20070730;21081900">
<META NAME="CHANGED" CONTENT="20081019;9043400">
<META NAME="CHANGED" CONTENT="20090101;17585200">
<STYLE TYPE="text/css">
<!--
TD P { color: #000000 }
@ -378,20 +378,22 @@ C</A>). </SPAN><FONT SIZE=3><SPAN STYLE="font-weight: medium">The
following is an example of a valid DataBar Expanded input</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="font-weight: medium"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
--barcode=31 -d &quot;[01]98898765432106[3202]012345[15]991231&quot;</FONT></FONT></P>
<P ALIGN=CENTER><IMG SRC="databar.png" NAME="graphics12" ALIGN=LEFT WIDTH=302 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
<P ALIGN=LEFT><IMG SRC="databar.png" NAME="graphics12" ALIGN=LEFT WIDTH=302 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P ALIGN=LEFT>[1] The zint command line program requires Latin-1
characters to be encoded using the UTF-8 system. These are converted
by the front-end into an extended ASCII string. When using the API
this type conversion will need to be done before invoking the library
otherwise the data will become corrupted. An example program
<FONT FACE="Courier, monospace">exttest.c</FONT> is included in the
/<FONT FACE="Courier, monospace">frontend</FONT> folder to show how
extended ASCII can be used to produce the following symbol. Extended
ASCII characters may not display properly in EPS due to the
restrictions of the EPS format.</P>
<P ALIGN=LEFT><IMG SRC="barext.png" NAME="graphics13" ALIGN=LEFT WIDTH=246 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
<P ALIGN=LEFT><A NAME="KOREA"></A><FONT SIZE=5><B>5.1.13 Korea Post
Barcode</B></FONT></P>
<P ALIGN=LEFT>The Korean Postal Barcode is used to encode a six-digit
number and includes one check digit.</P>
<P><IMG SRC="korea.png" NAME="korea post" ALIGN=LEFT WIDTH=334 HEIGHT=118 BORDER=0><BR><BR>
</P>
<P ALIGN=LEFT><BR><BR>
</P>
<P ALIGN=LEFT><BR><BR>
</P>
<P ALIGN=LEFT>[1] Zint requires input data to be encoded in UTF-8
format. <B>Note this now applies to both frontend and backend input
text</B>. Extended ASCII characters may not display properly in EPS
due to the restrictions of the EPS format.</P>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=TOP>

File diff suppressed because it is too large Load diff