mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
PDF_MAX --> option_3
if NO_PNG is defined don't compile PNG support
This commit is contained in:
parent
244381770b
commit
5230f54433
@ -37,6 +37,7 @@ struct zint_symbol *ZBarcode_Create()
|
|||||||
symbol->whitespace_width = 0;
|
symbol->whitespace_width = 0;
|
||||||
symbol->border_width = 0;
|
symbol->border_width = 0;
|
||||||
symbol->output_options = 0;
|
symbol->output_options = 0;
|
||||||
|
symbol->option_3 = 928; //PDF_MAX
|
||||||
symbol->rows = 0;
|
symbol->rows = 0;
|
||||||
symbol->width = 0;
|
symbol->width = 0;
|
||||||
strcpy(symbol->fgcolour, "000000");
|
strcpy(symbol->fgcolour, "000000");
|
||||||
@ -118,7 +119,6 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
/* First check the symbology field */
|
/* 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; }
|
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 */
|
/* 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[2] = symbol->outfile[strlen(symbol->outfile) - 1];
|
||||||
output[3] = '\0';
|
output[3] = '\0';
|
||||||
to_upper(output);
|
to_upper(output);
|
||||||
|
#ifndef NO_PNG
|
||||||
if(!(strcmp(output, "PNG"))) {
|
if(!(strcmp(output, "PNG"))) {
|
||||||
if(symbol->symbology == BARCODE_MAXICODE) {
|
if(symbol->symbology == BARCODE_MAXICODE) {
|
||||||
errno = maxi_png_plot(symbol);
|
errno = maxi_png_plot(symbol);
|
||||||
@ -265,13 +266,16 @@ int ZBarcode_Print(struct zint_symbol *symbol)
|
|||||||
errno = png_plot(symbol);
|
errno = png_plot(symbol);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
if(!(strcmp(output, "EPS"))) {
|
if(!(strcmp(output, "EPS"))) {
|
||||||
errno = ps_plot(symbol);
|
errno = ps_plot(symbol);
|
||||||
} else {
|
} else {
|
||||||
strcpy(symbol->errtxt, "error: unknown output format");
|
strcpy(symbol->errtxt, "error: unknown output format");
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
#ifndef NO_PNG
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
strcpy(symbol->errtxt, "error: unknown output format");
|
strcpy(symbol->errtxt, "error: unknown output format");
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
|
Loading…
Reference in New Issue
Block a user