Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
This documentation explains how to customize the appearance of barcodes using the Aspose.BarCode Cloud SDK for Dart. It provides details on the available methods, customization options, and examples of usage.
When generating a barcode, you can customize various aspects of its appearance using the properties of the request classes.
Key Properties:
QR
, Aztec
, Pdf417
, Code39
, etc).Png
, Jpeg
, Svg
).AliceBlue
or #FF000000
).Below
, Above
, None
).Pixel
, Inch
, Millimeter
).import 'dart:io';
import 'dart:typed_data';
import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart';
Configuration makeConfiguration() {
final envToken = Platform.environment['TEST_CONFIGURATION_ACCESS_TOKEN'];
if (envToken != null) {
return Configuration(accessToken: envToken);
} else {
return Configuration(
clientId: "Client Id from https://dashboard.aspose.cloud/applications",
clientSecret:
"Client Secret from https://dashboard.aspose.cloud/applications",
);
}
}
Future<void> main() async {
final configuration = makeConfiguration();
final apiClient = ApiClient(configuration);
final generateApi = GenerateApi(apiClient);
final fileName = '${Directory.current.path}${Platform.pathSeparator}qr.png';
final Uint8List response = await generateApi.generate(
EncodeBarcodeType.QR, "Aspose.BarCode.Cloud",
imageFormat: BarcodeImageFormat.Png,
foregroundColor: "Black",
backgroundColor: "White",
resolution: 300,
imageHeight: 200,
imageWidth: 200,
textLocation: CodeLocation.Below);
await File(fileName).writeAsBytes(response);
print("File '$fileName' generated.");
}
Result Image is:
import 'dart:io';
import 'dart:typed_data';
import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart';
Configuration makeConfiguration() {
final envToken = Platform.environment['TEST_CONFIGURATION_ACCESS_TOKEN'];
if (envToken != null) {
return Configuration(accessToken: envToken);
} else {
return Configuration(
clientId: "Client Id from https://dashboard.aspose.cloud/applications",
clientSecret:
"Client Secret from https://dashboard.aspose.cloud/applications",
);
}
}
Future<void> main() async {
final configuration = makeConfiguration();
final apiClient = ApiClient(configuration);
final generateApi = GenerateApi(apiClient);
final file = File(
"${Directory.current.path}${Platform.pathSeparator}Code39.jpeg",
);
final imageParams = BarcodeImageParams()
..foregroundColor = "#FF0000"
..backgroundColor = "#FFFF00"
..imageFormat = BarcodeImageFormat.Jpeg
..rotationAngle = 90;
final generateParams = GenerateParams(EncodeBarcodeType.Code39,
EncodeData("Aspose", EncodeDataType.StringData), imageParams);
final Uint8List response = await generateApi.generateBody(generateParams);
file.writeAsBytes(response);
print("File '${file.path}' generated.");
}
Result Image is:
import 'dart:io';
import 'dart:typed_data';
import 'package:aspose_barcode_cloud/aspose_barcode_cloud.dart';
Configuration makeConfiguration() {
final envToken = Platform.environment['TEST_CONFIGURATION_ACCESS_TOKEN'];
if (envToken != null) {
return Configuration(accessToken: envToken);
} else {
return Configuration(
clientId: "Client Id from https://dashboard.aspose.cloud/applications",
clientSecret:
"Client Secret from https://dashboard.aspose.cloud/applications",
);
}
}
Future<void> main() async {
final configuration = makeConfiguration();
final apiClient = ApiClient(configuration);
final generateApi = GenerateApi(apiClient);
final file = File(
"${Directory.current.path}${Platform.pathSeparator}Pdf417.svg",
);
final Uint8List barcodeStream = await generateApi.generateMultipart(
EncodeBarcodeType.Pdf417,
"Aspose.BarCode.Cloud",
textLocation: CodeLocation.Above,
imageFormat: BarcodeImageFormat.Svg,
);
file.writeAsBytes(barcodeStream);
print("File '${file.path}' generated.");
}
Result Image is:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.