Skip to content

Commit e172cd0

Browse files
committed
Release 25.7
1 parent 44de88c commit e172cd0

9 files changed

Lines changed: 369 additions & 9 deletions

bin/start_server.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set SCRIPT_DIR=%~dp0
44

55
:: Define the path to the JAR file relative to bin/
6-
set JAR_PATH=%SCRIPT_DIR%..\lib\aspose-barcode-php-25.6.jar
6+
set JAR_PATH=%SCRIPT_DIR%..\lib\aspose-barcode-php-25.7.jar
77

88
:: Define the log file path
99
set LOG_FILE=%SCRIPT_DIR%\server.log

bin/start_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55

66
# Define the path to the JAR file relative to this script
7-
JAR_PATH="$SCRIPT_DIR/../lib/aspose-barcode-php-25.6.jar"
7+
JAR_PATH="$SCRIPT_DIR/../lib/aspose-barcode-php-25.7.jar"
88

99
# Define the log file path (optional)
1010
LOG_FILE="$SCRIPT_DIR/server.log"

lib/Bridge/ThriftAsposeBarcodeServiceClient.php

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Bridge/ThriftAsposeBarcodeServiceIf.php

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Bridge/ThriftAsposeBarcodeService_BarcodeResult_getCodeTextWithEncoding_args.php

Lines changed: 118 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Bridge/ThriftAsposeBarcodeService_BarcodeResult_getCodeTextWithEncoding_result.php

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Generation.php

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,54 @@ public function getCodeText(): string
244244

245245
/**
246246
* <p>
247-
* Encodes codetext with byte order mark (BOM) using specified encoding.
248-
* </p>
249-
* @param string|array codeText CodeText string | Bytes of codetext
250-
* @param int encoding
247+
* <p>
248+
* Encodes the Unicode {@code <b>codeText</b>} into a byte sequence using the specified {@code <b>encoding</b>}.
249+
* UTF-8 is the most commonly used encoding.
250+
* If the encoding supports it and {@code <b>insertBOM</b>} is set to {@code true}, the function includes a
251+
* {@code <a href="https://en.wikipedia.org/wiki/Byte_order_mark#Byte-order_marks_by_encoding">byte order mark (BOM)</a>}.
252+
* </p>
253+
* <p>
254+
* This function is intended for use with 2D barcodes only (e.g., Aztec, QR, DataMatrix, PDF417, MaxiCode, DotCode, HanXin, RectMicroQR, etc.).
255+
* It enables manual encoding of Unicode text using national or special encodings; however, this method is considered obsolete in modern applications.
256+
* For modern use cases, {@code <a href="https://en.wikipedia.org/wiki/Extended_Channel_Interpretation">ECI</a>} encoding is recommended for Unicode data.
257+
* </p>
258+
* <p>
259+
* Using this function with 1D barcodes, GS1-compliant barcodes (including 2D), or HIBC barcodes (including 2D) is not supported by the corresponding barcode standards and may lead to unpredictable results.
260+
* </p>
261+
* </p><p><hr><blockquote><pre>
262+
* <p>This example shows how to use {@code SetCodeText} with or without a BOM for 2D barcodes.</p>
263+
* <pre>
264+
* //Encode codetext using UTF-8 with BOM
265+
* $gen = new BarcodeGenerator(EncodeTypes::QR, null);
266+
* $gen->setCodeText("車種名", "UTF-8", true);
267+
* $gen->save("barcode.png", BarCodeImageFormat::PNG);
268+
*
269+
* $reader = new BarCodeReader("barcode.png", null, DecodeType::QR);
270+
* $results = $reader->readBarCodes();
271+
* for($i = 0; $i < sizeof($results); $i++)
272+
* {
273+
* $result = $results[$i];
274+
* echo ("BarCode CodeText: " . $result->getCodeText());
275+
* }
276+
* //Encode codetext using UTF-8 without BOM
277+
* $gen = new BarcodeGenerator(EncodeTypes::QR, null);
278+
* $gen->setCodeText("車種名", "UTF-8", false);
279+
* $gen->save("barcode.png", BarCodeImageFormat::PNG);
280+
* $reader = new BarCodeReader("barcode.png", null, DecodeType.QR);
281+
* $results = $reader->readBarCodes();
282+
* for($i = 0; $i < sizeof($results); $i++)
283+
* {
284+
* $result = $results[$i];
285+
* echo ("BarCode CodeText: " . $result->getCodeText());
286+
* }
287+
* </pre>
288+
* </pre></blockquote></hr></p>
289+
* @param codeText CodeText string
290+
* @param encoding Applied encoding
291+
* @param insertBOM
292+
* Indicates whether to insert a byte order mark (BOM) when the specified encoding supports it (e.g., UTF-8, UTF-16, UTF-32).
293+
* If set to {@code true}, the BOM is added; if {@code false}, the BOM is omitted even if the encoding normally uses one.
294+
*
251295
*/
252296
public function setCodeText($codeText, ?string $encoding = null, ?bool $insertBOM = false): void
253297
{

0 commit comments

Comments
 (0)