wxMaxima
Loading...
Searching...
No Matches
pdfbarcodezint.h
1/*
2** Name: pdfbarcodezint.h
3** Purpose: Barcode support for wxPdfDocument based on Zint
4** Author: Ulrich Telle
5** Created: 2024-04-08
6** Copyright: (c) 2024-2025 Ulrich Telle
7** Licence: wxWindows licence
8** SPDX-License-Identifier: LGPL-3.0+ WITH WxWindows-exception-3.1
9*/
10
11#ifndef PDF_BARCODE_ZINT_H
12#define PDF_BARCODE_ZINT_H
13
14#include <wx/object.h>
15#include <wx/colour.h>
16#include <wx/dc.h>
17
18namespace wxPdfBarcode
19{
21 enum class Symbology : int
22 {
23 SYM_UNDEFINED = 0,
24 // Tbarcode 7 codes
25 SYM_CODE11 = 1,
26 SYM_C25STANDARD = 2,
27 SYM_C25MATRIX = 2,
28 SYM_C25INTER = 3,
29 SYM_C25IATA = 4,
30 SYM_C25LOGIC = 6,
31 SYM_C25IND = 7,
32 SYM_CODE39 = 8,
33 SYM_EXCODE39 = 9,
34 SYM_EANX = 13,
35 SYM_EANX_CHK = 14,
36 SYM_GS1_128 = 16,
37 SYM_EAN128 = 16,
38 SYM_CODABAR = 18,
39 SYM_CODE128 = 20,
40 SYM_DPLEIT = 21,
41 SYM_DPIDENT = 22,
42 SYM_CODE16K = 23,
43 SYM_CODE49 = 24,
44 SYM_CODE93 = 25,
45 SYM_FLAT = 28,
46 SYM_DBAR_OMN = 29,
47 SYM_RSS14 = 29,
48 SYM_DBAR_LTD = 30,
49 SYM_RSS_LTD = 30,
50 SYM_DBAR_EXP = 31,
51 SYM_RSS_EXP = 31,
52 SYM_TELEPEN = 32,
53 SYM_UPCA = 34,
54 SYM_UPCA_CHK = 35,
55 SYM_UPCE = 37,
56 SYM_UPCE_CHK = 38,
57 SYM_POSTNET = 40,
58 SYM_MSI_PLESSEY = 47,
59 SYM_FIM = 49,
60 SYM_LOGMARS = 50,
61 SYM_PHARMA = 51,
62 SYM_PZN = 52,
63 SYM_PHARMA_TWO = 53,
64 SYM_CEPNET = 54,
65 SYM_PDF417 = 55,
66 SYM_PDF417COMP = 56,
67 SYM_PDF417TRUNC = 56,
68 SYM_MAXICODE = 57,
69 SYM_QRCODE = 58,
70 SYM_CODE128AB = 60,
71 SYM_CODE128B = 60,
72 SYM_AUSPOST = 63,
73 SYM_AUSREPLY = 66,
74 SYM_AUSROUTE = 67,
75 SYM_AUSREDIRECT = 68,
76 SYM_ISBNX = 69,
77 SYM_RM4SCC = 70,
78 SYM_DATAMATRIX = 71,
79 SYM_EAN14 = 72,
80 SYM_VIN = 73,
81 SYM_CODABLOCKF = 74,
82 SYM_NVE18 = 75,
83 SYM_JAPANPOST = 76,
84 SYM_KOREAPOST = 77,
85 SYM_DBAR_STK = 79,
86 SYM_RSS14STACK = 79,
87 SYM_DBAR_OMNSTK = 80,
88 SYM_RSS14STACK_OMNI = 80,
89 SYM_DBAR_EXPSTK = 81,
90 SYM_RSS_EXPSTACK = 81,
91 SYM_PLANET = 82,
92 SYM_MICROPDF417 = 84,
93 SYM_USPS_IMAIL = 85,
94 SYM_ONECODE = 85,
95 SYM_PLESSEY = 86,
96
97 // Tbarcode 8 codes
98 SYM_TELEPEN_NUM = 87,
99 SYM_ITF14 = 89,
100 SYM_KIX = 90,
101 SYM_AZTEC = 92,
102 SYM_DAFT = 93,
103 SYM_DPD = 96,
104 SYM_MICROQR = 97,
105
106 // Tbarcode 9 codes
107 SYM_HIBC_128 = 98,
108 SYM_HIBC_39 = 99,
109 SYM_HIBC_DM = 102,
110 SYM_HIBC_QR = 104,
111 SYM_HIBC_PDF = 106,
112 SYM_HIBC_MICPDF = 108,
113 SYM_HIBC_BLOCKF = 110,
114 SYM_HIBC_AZTEC = 112,
115
116 // Tbarcode 10 codes
117 SYM_DOTCODE = 115,
118 SYM_HANXIN = 116,
119
120 // Tbarcode 11 codes
121 SYM_MAILMARK_2D = 119,
122 SYM_UPU_S10 = 120,
123 SYM_MAILMARK_4S = 121,
124 SYM_MAILMARK = 121,
125
126 // Zint specific
127 SYM_AZRUNE = 128,
128 SYM_CODE32 = 129,
129 SYM_EANX_CC = 130,
130 SYM_GS1_128_CC = 131,
131 SYM_EAN128_CC = 131,
132 SYM_DBAR_OMN_CC = 132,
133 SYM_RSS14_CC = 132,
134 SYM_DBAR_LTD_CC = 133,
135 SYM_RSS_LTD_CC = 133,
136 SYM_DBAR_EXP_CC = 134,
137 SYM_RSS_EXP_CC = 134,
138 SYM_UPCA_CC = 135,
139 SYM_UPCE_CC = 136,
140 SYM_DBAR_STK_CC = 137,
141 SYM_RSS14STACK_CC = 137,
142 SYM_DBAR_OMNSTK_CC = 138,
143 SYM_RSS14_OMNI_CC = 138,
144 SYM_DBAR_EXPSTK_CC = 139,
145 SYM_RSS_EXPSTACK_CC = 139,
146 SYM_CHANNEL = 140,
147 SYM_CODEONE = 141,
148 SYM_GRIDMATRIX = 142,
149 SYM_UPNQR = 143,
150 SYM_ULTRA = 144,
151 SYM_RMQR = 145,
152 SYM_BC412 = 146,
153 SYM_DXFILMEDGE = 147,
154 SYM_LAST = 147
155 };
156
158const int OUT_BIND_TOP = 0x00001;
159const int OUT_BIND = 0x00002;
160const int OUT_BOX = 0x00004;
161const int OUT_STDOUT = 0x00008;
162const int OUT_READER_INIT = 0x00010;
163const int OUT_SMALL_TEXT = 0x00020;
164const int OUT_BOLD_TEXT = 0x00040;
165const int OUT_CMYK_COLOUR = 0x00080;
166const int OUT_DOTTY_MODE = 0x00100;
167const int OUT_GS1_GS_SEPARATOR = 0x00200;
168const int OUT_BUFFER_INTERMEDIATE = 0x00400;
169const int OUT_QUIET_ZONES = 0x00800;
170const int OUT_NO_QUIET_ZONES = 0x01000;
171const int OUT_COMPLIANT_HEIGHT = 0x02000;
172const int OUT_EANUPC_GUARD_WHITESPACE = 0x04000;
173const int OUT_EMBED_VECTOR_FONT = 0x08000;
174const int OUT_MEMORY_FILE = 0x10000;
175
176// Input data types (`symbol->input_mode`)
177const int INP_DATA_MODE = 0;
178const int INP_UNICODE_MODE = 1;
179const int INP_GS1_MODE = 2;
180// The following may be OR-ed with above
181const int INP_ESCAPE_MODE = 0x0008;
182const int INP_GS1PARENS_MODE = 0x0010;
183const int INP_GS1NOCHECK_MODE = 0x0020;
184const int INP_HEIGHTPERROW_MODE = 0x0040;
185const int INP_FAST_MODE = 0x0080;
186const int INP_EXTRA_ESCAPE_MODE = 0x0100;
187
189const int OPT_DM_SQUARE = 100;
190const int OPT_DM_DMRE = 101;
191const int OPT_DM_ISO_144 = 128;
192
194const int OPT_FULL_MULTIBYTE = 200;
195
197const int OPT_ULTRA_COMPRESSION = 128;
198
200enum class ReturnCode : int
201{
202 BC_WARN_HRT_TRUNCATED = 1,
203 BC_WARN_INVALID_OPTION = 2,
204 BC_WARN_USES_ECI = 3,
205 BC_WARN_NONCOMPLIANT = 4,
206 BC_ERROR = 5,
207 BC_ERROR_TOO_LONG = 5,
208 BC_ERROR_INVALID_DATA = 6,
209 BC_ERROR_INVALID_CHECK = 7,
210 BC_ERROR_INVALID_OPTION = 8,
211 BC_ERROR_ENCODING_PROBLEM = 9,
212 BC_ERROR_FILE_ACCESS = 10,
213 BC_ERROR_MEMORY = 11,
214 BC_ERROR_FILE_WRITE = 12,
215 BC_ERROR_USES_ECI = 13,
216 BC_ERROR_NONCOMPLIANT = 14,
217 BC_ERROR_HRT_TRUNCATED = 15
218};
219
221const int WARN_DEFAULT = 0;
222const int WARN_FAIL_ALL = 2;
223
225const int CAP_HRT = 0x0001;
226const int CAP_STACKABLE = 0x0002;
227const int CAP_EANUPC = 0x0004;
228const int CAP_EXTENDABLE = 0x0004;
229const int CAP_COMPOSITE = 0x0008;
230const int CAP_ECI = 0x0010;
231const int CAP_GS1 = 0x0020;
232const int CAP_DOTTY = 0x0040;
233const int CAP_QUIET_ZONES = 0x0080;
234const int CAP_FIXED_RATIO = 0x0100;
235const int CAP_READER_INIT = 0x0200;
236const int CAP_FULL_MULTIBYTE = 0x0400;
237const int CAP_MASK = 0x0800;
238const int CAP_STRUCTAPP = 0x1000;
239const int CAP_COMPLIANT_HEIGHT = 0x2000;
240
241} // namespace wxPdfBarcode
242
243
244// Forward declarations
245struct zint_symbol;
246struct zint_structapp;
247class WXDLLIMPEXP_FWD_PDFDOC wxPdfDocument;
248
250
253class WXDLLIMPEXP_PDFDOC wxPdfZintSeg
254{
255public:
256 wxString m_text; // `seg->source` and `seg->length`
257 int m_eci; // `seg->eci`
258
259 wxPdfZintSeg();
260 wxPdfZintSeg(const wxString& text, const int ECIIndex = 0); // `ECIIndex` is comboBox index (not ECI value)
261};
262
264
267class WXDLLIMPEXP_PDFDOC wxPdfBarcodeZint : public wxObject
268{
269public:
272
275
277
280 wxPdfBarcode::Symbology GetSymbology() const { return static_cast<wxPdfBarcode::Symbology>(m_symbol); }
281
283
286 void SetSymbology(wxPdfBarcode::Symbology symbol) { m_symbol = static_cast<int>(symbol); }
287
289
292 int GetInputMode() const { return m_inputMode; }
293
295
298 void SetInputMode(int inputMode) { m_inputMode = inputMode; }
299
300 // Note text/eci and segs are mutually exclusive
301
303
306 wxString GetText() const { return m_text; }
307
309
313 void SetText(const wxString& text);
314
316
319 std::vector<wxPdfZintSeg> GetSegments() const { return m_segs; }
320
322
326 void SetSegments(const std::vector<wxPdfZintSeg>& segs);
327
329
332 wxString GetPrimaryMessage() const { return m_primaryMessage; }
333
335
338 void SetPrimaryMessage(const wxString& primaryMessage) { m_primaryMessage = primaryMessage; }
339
341
344 double GetHeight() const { return m_height; }
345
347
350 void SetHeight(double height) { m_height = height; }
351
353
356 int GetOption1() const { return m_option1; }
357
359
362 void SetOption1(int option) { m_option1 = option; }
363
365
368 int GetOption2() const { return m_option2; }
369
371
374 void SetOption2(int option) { m_option2 = option; }
375
377
380 int GetOption3() const { return m_option3; }
381
383
386 void SetOption3(int option) { m_option3 = option; }
387
389
392 double GetScale() const { return m_scale; }
393
395
398 void SetScale(double scale) { m_scale = scale; }
399
401
404 double GetDpmm() const { return m_dpmm; }
405
407
410 void SetDpmm(double dpmm) { m_dpmm = dpmm; }
411
413
416 bool GetDotty() const { return m_dotty; }
417
419
422 void SetDotty(bool dotty) { m_dotty = dotty; }
423
425
428 double GetDotSize() const { return m_dotSize; }
429
431
434 void SetDotSize(double dotSize) { m_dotSize = dotSize; }
435
437
440 double GetGuardDescent() const { return m_guardDescent; }
441
443
446 void SetGuardDescent(double guardDescent) { m_guardDescent = guardDescent; }
447
448 // Structured Append info
449 int GetStructAppCount() const;
450 int GetStructAppIndex() const;
451 wxString GetStructAppID() const;
452 void SetStructApp(const int count, const int index, const wxString& id);
453 void ClearStructApp();
454
456
459 wxString GetFgColourStr() const { return m_fgStr; }
460
462
465 bool SetFgColourStr(const wxString& fgStr); // Returns false if not valid colour string
466
468
471 wxColour GetFgColour() const; // `symbol->fgcolour`
472
474
477 void SetFgColour(const wxColour& fgColor);
478
480
483 wxString GetBgColourStr() const { return m_bgStr; }
484
486
489 bool SetBgColourStr(const wxString& bgStr); // Returns false if not valid colour string
490
492
495 wxColour GetBgColour() const; // `symbol->bgcolour`
496
498
501 void SetBgColour(const wxColour& bgColor);
502
504
507 bool GetCMYK() const { return m_cmyk; }
508
510
513 void SetCMYK(bool cmyk) { m_cmyk = cmyk; }
514
516
519 int GetBorderType() const { return m_borderType; }
520
522
525 void SetBorderType(int borderTypeIndex);
526
528
531 int GetBorderWidth() const { return m_borderWidth; }
532
534
537 void SetBorderWidth(int borderWidth);
538
540
543 int GetWhitespace() const { return m_whitespace; }
544
546
549 void SetWhitespace(int whitespace) { m_whitespace = whitespace; }
550
552
555 int GetVerticalWhitespace() const { return m_vwhitespace; }
556
558
561 void SetVerticalWhitespace(int vWhitespace) { m_vwhitespace = vWhitespace; }
562
564
567 int GetFontSetting() const { return m_fontSetting; }
568
570
574 void SetFontSetting(int fontSetting);
575
577
580 double GetTextGap() const { return m_textGap; }
581
583
586 void SetTextGap(double textGap) { m_textGap = textGap; }
587
589
592 bool ShowText() const { return m_showHRT; }
593
595
598 void SetShowText(bool showText) { m_showHRT = showText; }
599
601
604 bool HasSeparatorGS() const { return m_gssep; }
605
607
610 void SetSeparatorGS(bool gsSep) { m_gssep = gsSep; }
611
613
617 bool HasQuietZones() const { return m_quietZones; }
618
620
624 void SetQuietZones(bool quietZones) { m_quietZones = quietZones; }
625
627
631 bool HasNoQuietZones() const { return m_noQuietZones; }
632
634
638 void SetNoQuietZones(bool noQuietZones) { m_noQuietZones = noQuietZones; }
639
641
644 bool GetCompliantHeight() const { return m_compliantHeight; }
645
647
651 void SetCompliantHeight(bool compliantHeight) { m_compliantHeight = compliantHeight; }
652
654
657 int GetRotateAngle() const { return m_rotateAngle; }
658
660
664 void SetRotateAngle(int rotateAngle); // Sets literal value
665
667
670 int GetECI() const { return m_eci; }
671
672 // TODO
674
677 void SetECIFromIndex(int ECIIndex); // Sets from comboBox index
678
680
683 void SetECI(int eci); // Sets literal value
684
686
689 bool HasGS1ParensMode() const { return m_gs1parens; }
690
692
695 void SetGS1ParensMode(bool gs1Parens) { m_gs1parens = gs1Parens; }
696
698
701 bool GetGS1NoCheckMode() const { return m_gs1nocheck; }
702
704
707 void SetGS1NoCheckMode(bool gs1NoCheck) { m_gs1nocheck = gs1NoCheck; }
708
710
713 bool HasReaderInit() const { return m_readerInit; }
714
716
719 void SetReaderInit(bool readerInit) { m_readerInit = readerInit; }
720
722
725 bool HasGuardWhitespace() const { return m_guardWhitespace; }
726
728
731 void SetGuardWhitespace(bool guardWhitespace) { m_guardWhitespace = guardWhitespace; }
732
734
737 bool HasEmbedVectorFont() const { return m_embedVectorFont; }
738
740
743 void SetEmbedVectorFont(bool embedVectorFont) { m_embedVectorFont = embedVectorFont; }
744
746
749 int GetWarnLevel() const { return m_warnLevel; }
750
752
755 void SetWarnLevel(int warnLevel) { m_warnLevel = warnLevel; }
756
758
761 bool HasDebugFlag() const { return m_debug; }
762
764
767 void SetDebugFlag(bool debug) { m_debug = debug; }
768
770
774 int GetEncodedWidth() const { return m_encodedWidth; }
775
777
780 int GetEncodedRows() const { return m_encodedRows; }
781
783
786 double GetEncodedHeight() const; // Read-only, in X-dimensions
787
789
792 double GetVectorWidth() const { return m_vectorWidth; } // Read-only, scaled width
793
795
798 double GetVectorHeight() const { return m_vectorHeight; } // Read-only, scaled height
799
800 // Legacy property getters/setters
801
803
806 void SetWidth(int width); // `symbol->option_1`
807
809
812 int GetWidth() const;
813
815
818 void SetSecurityLevel(int securityLevel); // `symbol->option_2`
819
821
824 int GetSecurityLevel() const;
825
826 // Test capabilities - `ZBarcode_Cap()`
827
829
832 static bool HasHRT(wxPdfBarcode::Symbology symbology);
833
835
838 static bool IsStackable(wxPdfBarcode::Symbology symbology);
839
841
844 static bool IsExtendable(wxPdfBarcode::Symbology symbology);
845
847
850 static bool IsComposite(wxPdfBarcode::Symbology symbology);
851
853
856 static bool SupportsECI(wxPdfBarcode::Symbology symbology);
857
859
862 static bool SupportsGS1(wxPdfBarcode::Symbology symbology);
863
865
868 static bool IsDotty(wxPdfBarcode::Symbology symbology);
869
871
874 static bool HasDefaultQuietZones(wxPdfBarcode::Symbology symbology);
875
877
880 static bool HasFixedRatio(wxPdfBarcode::Symbology symbology);
881
883
886 static bool SupportsReaderInit(wxPdfBarcode::Symbology symbology);
887
889
892 static bool SupportsFullMultibyte(wxPdfBarcode::Symbology symbology);
893
895
898 static bool HasMask(wxPdfBarcode::Symbology symbology);
899
901
904 static bool SupportsStructApp(wxPdfBarcode::Symbology symbology);
905
907
910 static bool HasCompliantHeight(wxPdfBarcode::Symbology symbology);
911
913
916 static bool TakesGS1AIData(wxPdfBarcode::Symbology symbology);
917
918 // Error handling
919
921
924 int GetError() const { return m_error; }
925
927
930 const wxString& GetLastError() const { return m_lastError; }
931
933
936 bool HasErrors() const; // `symbol->errtxt`
937
939
943 bool SaveToFile(const wxString& filename); // `ZBarcode_Print()`
944
946
953 void Render(wxPdfDocument& pdfDoc, double x, double y);
954
956
959 double GetDefaultXdim() const;
960
962
966 static double GetDefaultXdim(wxPdfBarcode::Symbology symbology);
967
969
973 static wxString GetBarcodeName(const wxPdfBarcode::Symbology symbology); // `ZBarcode_BarcodeName()`
974
976
979 static bool NoPNG(); // `ZBarcode_NoPng()`
980
982
985 static bool IsValidSymbology(int symbolId);
986
988
991 static int GetVersion(); // `ZBarcode_Version()`
992
993private:
995 bool ResetSymbol();
996
998 void Encode();
999
1000private:
1001 zint_symbol* m_zintSymbol;
1002 int m_symbol;
1003 int m_inputMode;
1004 wxString m_text;
1005 wxString m_primaryMessage;
1006 std::vector<wxPdfZintSeg> m_segs;
1007 double m_height;
1008 int m_option1;
1009 int m_option2;
1010 int m_option3;
1011 double m_dpmm;
1012 double m_scale;
1013 bool m_dotty;
1014 double m_dotSize;
1015 double m_guardDescent;
1016 double m_textGap;
1017 zint_structapp* m_structapp;
1018 wxString m_fgStr;
1019 wxString m_bgStr;
1020 bool m_cmyk;
1021 int m_borderType;
1022 int m_borderWidth;
1023 int m_whitespace;
1024 int m_vwhitespace;
1025 int m_fontSetting;
1026 bool m_showHRT;
1027 bool m_gssep;
1028 bool m_quietZones;
1029 bool m_noQuietZones;
1030 bool m_compliantHeight;
1031 int m_rotateAngle;
1032 int m_eci;
1033 bool m_gs1parens;
1034 bool m_gs1nocheck;
1035 bool m_readerInit;
1036 bool m_guardWhitespace;
1037 bool m_embedVectorFont;
1038 int m_warnLevel;
1039 bool m_debug;
1040 int m_encodedWidth;
1041 int m_encodedRows;
1042 double m_encodedHeight;
1043 double m_vectorWidth;
1044 double m_vectorHeight;
1045 wxString m_lastError;
1046 int m_error;
1047};
1048
1049#endif // PDF_BARCODE_ZINT_H
Class representing Zint barcode objects.
Definition: pdfbarcodezint.h:268
bool GetCMYK() const
Get flag whether CMYK colour space is used (Encapsulated PostScript and TIF)
Definition: pdfbarcodezint.h:507
bool ShowText() const
Show (true) or hide (false) Human Readable Text.
Definition: pdfbarcodezint.h:592
void SetGS1NoCheckMode(bool gs1NoCheck)
Set flag whether validity of GS1 data is not checked (except that printable ASCII only)
Definition: pdfbarcodezint.h:707
void SetDotSize(double dotSize)
Set size of dots used in dotty mode.
Definition: pdfbarcodezint.h:434
int GetWarnLevel() const
Get the warning level.
Definition: pdfbarcodezint.h:749
wxString GetPrimaryMessage() const
Get the primary message (Maxicode, Composite)
Definition: pdfbarcodezint.h:332
double GetVectorWidth() const
Get the vector width after successful rendering.
Definition: pdfbarcodezint.h:792
void SetPrimaryMessage(const wxString &primaryMessage)
Set the primary message (Maxicode, Composite)
Definition: pdfbarcodezint.h:338
int GetError() const
Get the error or warning code returned by Zint on render() or save_to_file()
Definition: pdfbarcodezint.h:924
void SetHeight(double height)
Set the symbol height in X-dimensions.
Definition: pdfbarcodezint.h:350
void SetQuietZones(bool quietZones)
Enable or disable compliant quiet zones (additional to any specified whitespace)
Definition: pdfbarcodezint.h:624
void SetWarnLevel(int warnLevel)
Set the warning level.
Definition: pdfbarcodezint.h:755
std::vector< wxPdfZintSeg > GetSegments() const
Get the segments.
Definition: pdfbarcodezint.h:319
bool HasQuietZones() const
Add compliant quiet zones (additional to any specified whitespace)
Definition: pdfbarcodezint.h:617
void SetNoQuietZones(bool noQuietZones)
Enable or disable quiet zones, notably those with defaults.
Definition: pdfbarcodezint.h:638
double GetTextGap() const
Get the text gap.
Definition: pdfbarcodezint.h:580
bool HasReaderInit() const
Check whether Reader Initialisation (Programming) is used.
Definition: pdfbarcodezint.h:713
int GetVerticalWhitespace() const
Get the height in X-dimensions of whitespace above & below the barcode.
Definition: pdfbarcodezint.h:555
wxString GetText() const
Get the input data.
Definition: pdfbarcodezint.h:306
bool GetGS1NoCheckMode() const
Get flag whether validity of GS1 data is not checked (except that printable ASCII only)
Definition: pdfbarcodezint.h:701
int GetOption3() const
Get symbol-specific option 3.
Definition: pdfbarcodezint.h:380
bool HasEmbedVectorFont() const
Check whether the font will be embedded in vector output - currently only for SVG output of EAN/UPC.
Definition: pdfbarcodezint.h:737
int GetEncodedRows() const
Get the number of encoded rows after successful rendering.
Definition: pdfbarcodezint.h:780
void SetOption3(int option)
Set symbol-specific option 3.
Definition: pdfbarcodezint.h:386
int GetFontSetting() const
Type of font to use i.e. normal, small, bold or (vector only) small bold.
Definition: pdfbarcodezint.h:567
wxString GetFgColourStr() const
Get the foreground colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string)
Definition: pdfbarcodezint.h:459
int GetWhitespace() const
Get the width in X-dimensions of whitespace to left & right of barcode.
Definition: pdfbarcodezint.h:543
void SetSeparatorGS(bool gsSep)
Use GS (Group Separator) instead of FNC1 as GS1 separator (Data Matrix)
Definition: pdfbarcodezint.h:610
const wxString & GetLastError() const
Get the error message returned by Zint on render() or save_to_file()
Definition: pdfbarcodezint.h:930
void SetCMYK(bool cmyk)
Enable or disable the use of CMYK colour space (Encapsulated PostScript and TIF)
Definition: pdfbarcodezint.h:513
void SetDotty(bool dotty)
Set dotty mode.
Definition: pdfbarcodezint.h:422
bool HasSeparatorGS() const
Check whether GS (Group Separator) is used instead of FNC1 as GS1 separator (Data Matrix)
Definition: pdfbarcodezint.h:604
bool HasGS1ParensMode() const
Get flag whether parentheses are processed as GS1 AI delimiters (instead of square brackets)
Definition: pdfbarcodezint.h:689
void SetShowText(bool showText)
Enable (true) or disable (false) Human Readable Text.
Definition: pdfbarcodezint.h:598
wxPdfBarcode::Symbology GetSymbology() const
Get symbology in use.
Definition: pdfbarcodezint.h:280
bool GetDotty() const
Get dotty mode.
Definition: pdfbarcodezint.h:416
void SetEmbedVectorFont(bool embedVectorFont)
Set flag whether to embed the font in vector output - currently only for SVG output of EAN/UPC.
Definition: pdfbarcodezint.h:743
double GetHeight() const
Get the symbol height in X-dimensions.
Definition: pdfbarcodezint.h:344
wxString GetBgColourStr() const
Get the background colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string)
Definition: pdfbarcodezint.h:483
double GetDpmm() const
Get the resolution of output in dots per mm (BMP/EMF/PCX/PNG/TIF only)
Definition: pdfbarcodezint.h:404
bool HasNoQuietZones() const
Disable quiet zones, notably those with defaults.
Definition: pdfbarcodezint.h:631
void SetScale(double scale)
Set scale factor when printing barcode, i.e. adjusts X-dimension.
Definition: pdfbarcodezint.h:398
void SetReaderInit(bool readerInit)
Set Reader Initialisation (Programming)
Definition: pdfbarcodezint.h:719
void SetVerticalWhitespace(int vWhitespace)
Get the height in X-dimensions of whitespace above & below the barcode.
Definition: pdfbarcodezint.h:561
void SetGuardWhitespace(bool guardWhitespace)
Set flag whether to add quiet zone indicators ("<", ">") to HRT (EAN/UPC)
Definition: pdfbarcodezint.h:731
void SetWhitespace(int whitespace)
Set the width in X-dimensions of whitespace to left & right of barcode.
Definition: pdfbarcodezint.h:549
bool GetCompliantHeight() const
Get compliant height flag.
Definition: pdfbarcodezint.h:644
int GetBorderType() const
Get the type of border above/below/around barcode.
Definition: pdfbarcodezint.h:519
double GetVectorHeight() const
Get the vector height after successful rendering.
Definition: pdfbarcodezint.h:798
void SetGuardDescent(double guardDescent)
Set the height in X-dimensions that EAN/UPC guard bars descend.
Definition: pdfbarcodezint.h:446
bool HasDebugFlag() const
Check the debugging flag.
Definition: pdfbarcodezint.h:761
void SetSymbology(wxPdfBarcode::Symbology symbol)
Set symbology to use.
Definition: pdfbarcodezint.h:286
bool HasGuardWhitespace() const
Check whether quiet zone indicators will be added.
Definition: pdfbarcodezint.h:725
int GetEncodedWidth() const
Get the encoded width after successful rendering.
Definition: pdfbarcodezint.h:774
double GetGuardDescent() const
Get the height in X-dimensions that EAN/UPC guard bars descend.
Definition: pdfbarcodezint.h:440
int GetOption1() const
Get symbol-specific option 1.
Definition: pdfbarcodezint.h:356
void SetDebugFlag(bool debug)
Debugging flags.
Definition: pdfbarcodezint.h:767
double GetDotSize() const
Get size of dots used in dotty mode.
Definition: pdfbarcodezint.h:428
double GetScale() const
Get scale factor when printing barcode, i.e. adjusts X-dimension.
Definition: pdfbarcodezint.h:392
void SetOption2(int option)
Set symbol-specific option 2.
Definition: pdfbarcodezint.h:374
void SetOption1(int option)
Set symbol-specific option 1.
Definition: pdfbarcodezint.h:362
void SetInputMode(int inputMode)
Set the input data encoding. Default UNICODE_MODE.
Definition: pdfbarcodezint.h:298
void SetDpmm(double dpmm)
Set the resolution of output in dots per mm (BMP/EMF/PCX/PNG/TIF only)
Definition: pdfbarcodezint.h:410
void SetGS1ParensMode(bool gs1Parens)
Set flag whether parentheses are processed as GS1 AI delimiters (instead of square brackets)
Definition: pdfbarcodezint.h:695
int GetOption2() const
Get symbol-specific option 2.
Definition: pdfbarcodezint.h:368
int GetRotateAngle() const
Rotate barcode by angle (degrees 0, 90, 180 and 270)
Definition: pdfbarcodezint.h:657
int GetECI() const
Get Extended Channel Interpretation (segment 0 eci)
Definition: pdfbarcodezint.h:670
int GetInputMode() const
Get the input data encoding. Default UNICODE_MODE.
Definition: pdfbarcodezint.h:292
int GetBorderWidth() const
Get the border width in X-dimensions.
Definition: pdfbarcodezint.h:531
void SetCompliantHeight(bool compliantHeight)
Set compliant height.
Definition: pdfbarcodezint.h:651
void SetTextGap(double textGap)
Set the text gap.
Definition: pdfbarcodezint.h:586
Class representing a PDF document.
Definition: pdfdocument.h:176
Class representing Zint segments.
Definition: pdfbarcodezint.h:254
Definition: zint.h:94
Definition: zint.h:108