?? readme.old
字號:
The pdf417_encode program will take an input text file and convertit to postscript output in pdf417 barcode format. Usage: pdf417_enc -t[type] infile outfile [rows] [columns] [ec_level] -t[type] - You can now specify the type of output that is generated. Valid types are pbm, raw, ps, psbits, and gif. The default type is postscript (ps). The -t is optional. The raw type will cause no output, but will put the barcode in an internal array of bits. The option -t psbits will give only the bitmap portion of the postcript output. infile - The input file to the program. The format for this file is given below. If the infile = _ then stdin is used. outfile - The output file. Note that for the postscript output this is not a printable postscript file and lacks the headers necessary to print. The ex.ps file is included to show how this postscript can be included in a printable postscript file. If the outfile = _ then stdout is used. [rows] - Number of rows in the output barcode. Must be decimal less than 90. However a special value of rows = 999 will cause the barcode to grow to the size needed to fit the data. If no rows are specified, the default = 24 rows. [columns] - Number of columns in the output barcode. Note that if rows is supplied, then columns must also be supplied. Columns must be less than 30. The default if no columns are given is 8. [ec_level] Specifies the error correction level to be used. Must be from 1 to 8. The default if not specified is 5. This option can only be used if rows and columns are also specified. The ec_level will cause 2 * ( 2 ** ec_level) codewords to be used for error correction. An ec_level of 5 will use 2 * ( 2 ** 5) or 64 codewords to be used for error correction. To compile: Modify the Makefile to reflect your system ie UNAME = { Linux, FreeBSD, Other } Also, you can modify it to select either a libpdf417enc.a or libpdf417enc.so make will make the binary executable pdf417_enc make lib will make a callable libary libpdf417enc.a and a test program called lib_test make clean remove all .o files and results of previous compile make lib_test creates a small program that tests the libpdf417enc.a make libpdf417enc.a or make libpdf417enc.so create the callable library for pdf417 routines If the rows and columns are not specified the number of rows defaultsto 24 and the number of columns defaults to 8. The pdf program takes as input a file that consists of two columns.The first column has in capital letters BC, TC, NC and MC. BC indicates thatthe ascii text will be byte compressed. TC indicates that the textwill be text compressed and NC indicates that the text will benumerically compressed. MC is only used for specifying the File IDand segment index for a Macro PDF ( multiple symbol) barcode. You can embed special characters in theText compress mode (TC) by using \CR for carriage return, \LF for new line, \DQ for double quote and \NL for carriage return followed byline feed. Also, use \BS for backslash itself.The second column will have a text string beginning with and endingwith quotes. For BC the text must consist of the numbers 0-9 and lettersA-F ( Hex 0-9, A-F). Also, in BC if the length of the string is odd,a zero will be prepended to the string to make it and even number.For TC the text can consist of any of the legaltext compress charactors in the pdf417 standard. For NC, the letters 0-9 are allowed in the text.An example of a valid input file are given below.BC "000197380300"TC "062S_"BC "940400F0BA54"BC "0A00260200B5"BC "0A3101DB6401"BC "0064FB20BE0C"BC "6159ADD80700"BC "D08905003131"BC "303081FCA4C1"BC "004A9ABFC647"BC "D057E68B8415"BC "8464AF4255A5"BC "09A2F5C14CC8"BC "DD74DC72D3DD"BC "DD402C90698B"TC ""TC "" I have included in this release some Linux Intel binaries for doing decoding of the pdf417_barcodes. The first program is scan_image. This can read in the output of pdf417_encode and put out the original text used to create the input. Right now it only works for the output file I create with my pdf417_encode program. Look at the example run.scan in this directory. The second program is called scan_data. This performs the decode function on data that is supplied as output from a frontend program that reads in a graphics ( pnm ) image file of a barcode. This barcode graphics file is what might be read in using a flatbed scanner to scan in the barcode. The format of the data input to scan_data consists of the row and column, followed by the code value ( ranging from 0 to 2787 ( 929 * 3). The code value = 9999 indicates that the module at that and row and column could not be decoded ( erasure ). The data is the output of the program called frontend. Frontend can read in a graphics file ( .pnm ). The .pnm file is obtained by scanning in a barcode using a flatbed scanner. The frontend program will locate the barcode in the image ( must be surrounded by white space ) and will figure out the slant of the barcode in the image. The slant will be corrected and the barcode is then analyzed. Usage: frontend in.pnm [1-7] in.pnm is the input pnm file. Optionally followed by a number from 1-7 If number is odd, = write all the mods in the files outmodulex_y.pgm for all x,y = row and column numbers If number has 2 bit set = write the final unslanted barcode in outf.pgm If number has 4 bit set = write final barcode columns in outcolx.pgm write the final barcode in out.pgm so for example frontend in.pnm 7 will write out all the module and column .pgm files and the outf.pgm file. plus produce and out.data file for use with scan_text. See the examples in the directory frontend. Finally, I have a pdf417_decode program that works simularly to the frontend, but combines the functionality of the scan_data program as well. Usage: pdf417_dec in.pnm [0-7] This will readin a scanned .pnm file with a barcode on it. It will locate the barcode on the page, unslant it and attempt to decode it ( with proper error correction if needed ). The output text will be in the file out.txt. Note that the .pnm used as input must be a greyscale image ( ie a .pgm file). The gimp can create a .pnm output file that is color also, so you MUST set gimp to output greyscale if you process your image thru the gimp. The input file must have some amount of whitespace around the border to work also. I have provided a couple example in the directory pdf417_dec of the usage of this program. PDF417 Library You can now make a shared calleable library of the pdf417_enc. To generate the library type make lib This will create libpdf417enc.a. This shared library can be copied to /usr/local/lib. An example of the use of library is given in the c code lib_test.c. The include file for the calleable routines is in pdf417.h and a script for compiling the lib_test example is in compile.lib_test.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -