?? lib_test2.c
字號:
#include <stdio.h>#include <stdlib.h>#include "pdf417.h"#define TRUE 1#define FALSE 0// An example of a c program calling the pdf417_enc routines as library// calls// This example takes a buffer from stdin and makes a symbol// using the annex P algorithmintmain (int argc, char **argv){#define _setmode(X,Y) FILE* fp; char buffer[4096]; int len = 0; char c; _setmode(fileno(stdin), _O_BINARY); memset(buffer,0, 4096); fp = stdout; while(len < 4096) { c = fgetc(stdin); if (c == EOF && feof(stdin)) { break; } buffer[len] = c; len++; } // first initialize some arrays needed pdf417_init_arrays (); printf ("Init arrays success \n"); // take the input buffer read in and put it into the raw // array pdf417_prep_to_raw(buffer,len);// set the output filename pdf417_set_output_filename ("outlib2.ps"); printf ("About to call pdf417_en \n");// call the main encoding routine// parameters are rows, columns, ec_level, output_type, use_default, // usr_raw_mode pdf417_en (8, 24, 2, OUTPUT_PS, TRUE, TRUE); // or// call the main encoding routine// parameters are rows, columns, ec_level, output_type, use_default, // usr_raw_mode, Xwid, Ymultiple, QZwidth// pdf417_en_new( 8, 24, 2, OUTPUT_PS, TRUE, TRUE, 10, 6, 36 );}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -