PDF_MAX --> option_3

if NO_PNG is defined don't compile PNG support
This commit is contained in:
taipanromania 2008-07-18 14:43:30 +00:00
parent 244381770b
commit 5230f54433

View File

@ -37,6 +37,7 @@ struct zint_symbol *ZBarcode_Create()
symbol->whitespace_width = 0;
symbol->border_width = 0;
symbol->output_options = 0;
symbol->option_3 = 928; //PDF_MAX
symbol->rows = 0;
symbol->width = 0;
strcpy(symbol->fgcolour, "000000");
@ -118,7 +119,6 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input)
errno = 0;
/* First check the symbology field */
if(symbol->symbology < 1) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; errno = WARN_INVALID_OPTION; }
/* symbol->symbologys 1 to 86 are defined by tbarcode */
@ -258,6 +258,7 @@ int ZBarcode_Print(struct zint_symbol *symbol)
output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
output[3] = '\0';
to_upper(output);
#ifndef NO_PNG
if(!(strcmp(output, "PNG"))) {
if(symbol->symbology == BARCODE_MAXICODE) {
errno = maxi_png_plot(symbol);
@ -265,13 +266,16 @@ int ZBarcode_Print(struct zint_symbol *symbol)
errno = png_plot(symbol);
}
} else {
#endif
if(!(strcmp(output, "EPS"))) {
errno = ps_plot(symbol);
} else {
strcpy(symbol->errtxt, "error: unknown output format");
return ERROR_INVALID_OPTION;
}
#ifndef NO_PNG
}
#endif
} else {
strcpy(symbol->errtxt, "error: unknown output format");
return ERROR_INVALID_OPTION;