Skip to content

Commit

Permalink
Improved content of page 'product-overview'
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-grinin committed Feb 7, 2025
1 parent 0636ad9 commit 8ca8d73
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion java/getting-started/product-overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,54 @@ The <em>ComplexBarcode</em> namespace includes the
SwissQRBill</em></a> and <a href="https://reference.aspose.com/barcode/java/com.aspose.barcode.complexbarcode/SwissQRCodetext"
target="_blank"><em>SwissQRCodetext</em></a> classes, which provide various functionalities for working with Swiss QR Codes, such
as retrieving or setting the creditor's account
number, defining alternative payment schemes, specifying the payment amount, currency, and more.
number, defining alternative payment schemes, specifying the payment amount, currency, and more.

### **Examples**
{{< highlight java >}}
public void generate_Barcodes_using_Code_128() throws IOException
{
String filePath = folderPath + "output.png";
// Instantiate the BarcodeGenerator object and set barcode properties
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128, "1234567");
generator.getParameters().getBarcode().getXDimension().setMillimeters(1f);
// Save the barcode image to the specified directory in PNG format
generator.save(filePath, BarCodeImageFormat.PNG);
}

{{< /highlight >}}

{{< highlight java >}}
public void read_Barcodes_from_File() throws IOException
{
String filePath = folderPath + "output.png";
BarCodeReader reader = new BarCodeReader(filePath, DecodeType.ALL_SUPPORTED_TYPES);
for (BarCodeResult result : reader.readBarCodes())
{
// Read symbology type and code text
System.out.printf("Symbology Type: %s%n", result.getCodeType());
System.out.printf("CodeText: %s%n", result.getCodeText());
}
}
{{< /highlight >}}

{{< highlight java >}}
public void Read_Barcodes_from_Stream1() throws IOException
{
String filePath = folderPath + "image.png";
try (FileInputStream fileStream = new FileInputStream(filePath))
{
BarCodeReader reader = new BarCodeReader(fileStream);
for (BarCodeResult result : reader.readBarCodes())
{
System.out.printf("Symbology Type: %s%n", result.getCodeType());
System.out.printf("CodeText: %s%n", result.getCodeText());
}
}
catch (IOException e)
{
e.printStackTrace();
}
}

{{< /highlight >}}

0 comments on commit 8ca8d73

Please sign in to comment.