⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lib_test2.c

📁 PDF417编码的算法的源程序
💻 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 );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -