1
- using Syncfusion . DocIO . DLS ;
1
+ using Syncfusion . DocIO . DLS ;
2
2
using Syncfusion . DocIO ;
3
3
using Syncfusion . Pdf . Barcode ;
4
4
using Syncfusion . Pdf . Graphics ;
@@ -113,7 +113,6 @@ private static void ReplaceFieldwithImage(WordDocument document)
113
113
114
114
// Initialize flags for optional parameters
115
115
bool addText = false ;
116
- bool addCharacter = false ;
117
116
118
117
// Check for the \t option (whether to display text below the barcode)
119
118
var tabMatch = Regex . IsMatch ( field . FieldCode , @"\\t" ) ;
@@ -122,15 +121,9 @@ private static void ReplaceFieldwithImage(WordDocument document)
122
121
addText = true ;
123
122
}
124
123
125
- // Check for the \d option (whether to include start/stop characters)
126
- var digitMatch = Regex . IsMatch ( field . FieldCode , @"\\d" ) ;
127
- if ( digitMatch )
128
- {
129
- addCharacter = true ;
130
- }
131
124
132
125
// Generate the Code39 barcode image as a byte array
133
- byte [ ] qrCode = GenerateCODE39Image ( qrBarcodeText , addCharacter , addText ) ;
126
+ byte [ ] qrCode = GenerateCODE39Image ( qrBarcodeText , addText ) ;
134
127
135
128
// Create a new picture object to hold the barcode image
136
129
WPicture picture = new WPicture ( document ) ;
@@ -201,10 +194,9 @@ private static byte[] GenerateQRBarcodeImage(string qrBarcodeText, float sSwitch
201
194
/// Generates a Code39 barcode image and converts it to a byte array.
202
195
/// </summary>
203
196
/// <param name="qrBarcodeText">The text to be encoded in the Code39 barcode</param>
204
- /// <param name="dSwitch">Whether to include start/stop characters (\d option)</param>
205
197
/// <param name="tSwitch">Whether to display the text below the barcode (\t option)</param>
206
198
/// <returns>A byte array representing the Code39 barcode image</returns>
207
- private static byte [ ] GenerateCODE39Image ( string qrBarcodeText , bool dSwitch , bool tSwitch )
199
+ private static byte [ ] GenerateCODE39Image ( string qrBarcodeText , bool tSwitch )
208
200
{
209
201
// Create a new Code39 barcode instance
210
202
PdfCode39Barcode barcode = new PdfCode39Barcode ( ) ;
0 commit comments