in reply to how to create a barcode PDF417
The example is provided for Windows and was compiled using Visual C++ 6.0. The code can, however, be used with any ANSI C compiler. The only assumption is that an int is at least 32 bit long.Compile (on Win32) with gcc (mingw):
The generated "hello.ps" postscript file:C:\download\pdf417lib\pdf417lib-c-0.91>gcc --version gcc (GCC) 3.4.5 (mingw special) C:\download\pdf417lib\pdf417lib-c-0.91>gcc -o pdf417 pdf417.c pdf417li +b.c C:\download\pdf417lib\pdf417lib-c-0.91>pdf417 hello.ps "hello world" Thello world
A simple makefile:/Times findfont 12 scalefont setfont 100 80 moveto (A PDF417 example.)show stroke 100 100 translate 43 22.5 scale 86 15 1 [86 0 0 -15 0 15]{< 00AB8561C571E2A3F0175B 00AB857BCD1BE05630175B 00AB9507C6A06AF0F0175B 00AB82815BE4E50830175B 00AB947DC3EB628E70175B 00AB828F5DF4214130175B 00AB9630C6FA2B11F0175B 00AB8168D82C6A0630175B 00ABAC83D82320B170175B 00ABAE23CA106B9CF0175B 00AB963DD828E2C670175B 00AB9760D9CC205CD0175B 00ABAFAFC31D2BCF30175B 00AB85DEC29E6176F0175B 00AB85E14F852BF610175B >}image showpage
Compile and run on Linux i386 (gcc version 3.4.6):$ cat makefile CC = gcc -O pdf417 : pdf417.c pdf417lib.c pdf417lib.h $(CC) -o pdf417 pdf417.c pdf417lib.c pdf417lib.h -lm
Converted with ps2pdf is shows the barcode in the lower left corner.$ make gcc -O -o pdf417 pdf417.c pdf417lib.c pdf417lib.h -lm Compile on Linux i386: $ ./pdf417 hello.ps "hello world" Thello world
Update Tue Feb 19 12:26:16 CET 2008: Added sample code.
Update Wed Feb 20 08:22:01 CET 2008: Added Linux makefile.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to create a barcode PDF417
by padawan_linuxero (Scribe) on Feb 20, 2008 at 16:56 UTC | |
by Anonymous Monk on Nov 30, 2015 at 14:34 UTC |