ამ სტატიის მიხედვით, ჩვენ ვიმსჯელებთ დეტალებზე თუ როგორ შევქმნათ Bar-кოდი Java-ს გამოყენებით, ასევე შეგვიძლია დავინახოთ Bar-кოდის აღიარება იგივე Java API-ით. ჩვენ უკვე ვიცით, რომ Bar-кოდი არის კოდის ნიშნვებმა, რომელიც განთავსებულია ყველა საქონელზე და აძლევს კომპიუტერებს საშუალებას, რომ სწრაფად და უფრო ზუსტად შეამოწმონ და ჩამოაყალიბონ პროდუქტები. მსგავსად, ისინი ადვილად დაიბეჭდება და დამატება შესაძლებელია ნივთებზე დროული რეჟიმით, ასე რომ თქვენი მთელი ინვენტარი სატენდერო და გაწვდილი იქნება დაუყოვნებლივ. გარდა ამისა, Bar-кოდი უზრუნველყოფს პროდუქტის ავტომატურ იდენტიფიკაციას, უკიდურესად სწრაფ აღ recogn აკებას და მონაცემების განხორციელებას ძალიან დაბალი შეცდომების მაჩვენებლით
ბარკოდის გენერაციის API
Aspose.BarCode Cloud არის REST API, რომელიც საშუალებას იძლევა ჩვენს მომხმარებლებს გააკეთონ BarCode-ის გენერაცია და მანიპულირება პროგრამირებაში.
API-ს შეუძლია პოპულარული რასტრული სურათების ფორმატების პარსირება. დამატებითი დეტალებისთვის გთხოვთ მოინახულოთ Supported File Formats.
განდაინერეთ بار코德 განზომილებებით
ჩვენი API-ების ტესტირების სწრაფი და მარტივი გზა არის API რეференცის განყოფილების გამოყენება. GetBarcodeGenerate მეთოდი გამოიყენება BarCode სურათების შესაქმნელად და ის უკეთ ახდენს მრავალფეროვანი ოპციების მიწვდას BarCode-ის გენერაციისთვის თქვენი მოთხოვნების შესაბამისად, ხოლო კონკრეტულ პარამეტრებთან დაკავშირებული დეტალები კარგად არის განმარტებული API რეferenცის გვერდზე. BarCode-ის გენერაციის პროცესში, შეგიძლიათ განსაზღვროთ შემდეგი ტიპებიდან რომელიმე
- Codabar
- Code11
- Code39Standard
- Code39Extended
- Code93Standard
- Code93Extended
- Code128
- GS1Code128
- EAN8
- EAN13
- EAN14
- SCC14
- SSCC18
- UPCA
- UPCE
- ISBN
- ISSN
- ISMN
- Standard2of5
- Interleaved2of5
- Matrix2of5
- ItalianPost25
- IATA2of5
- ITF14
- ITF6
- MSI
- VIN
- DeutschePostIdentcode
- DeutschePostLeitcode
- OPC
- PZN
- Code16K
- ფარმაკოდი
- DataMatrix
- QR
- Aztec
- Pdf417
- MacroPdf417
- AustraliaPost
- Postnet
- პლენეტა
- OneCode
- RM4SCC
- DatabarOmniDirectional
- DatabarTruncated
- DatabarLimited
- DatabarExpanded
- SingaporePost
- GS1DataMatrix
- AustralianPosteParcel
- SwissPostParcel
- PatchCode
- DatabarExpandedStacked
- DatabarStacked
- DatabarStackedOmniDirectional
- MicroPdf417
- GS1QR
- MaxiCode
- Code32
- DataLogic2of5
- DotCode
- DutchKIX
- UpcaGs1Code128Coupon
- UpcaGs1DatabarCoupon
- CodablockF
- GS1CodablockF
cURL ბრძანება
curl -X GET "https://api.aspose.cloud/v3.0/barcode/generate?Type=Codabar&Text=Hello%20World&TwoDDisplayText=QR&TextLocation=Above&TextAlignment=Center&TextColor=Blue&FontSizeMode=Auto&Resolution=96&TextSpace=2&Units=Point&SizeMode=Nearest&BarHeight=50&ImageHeight=200&ImageWidth=200&RotationAngle=0&BackColor=White&BorderDashStyle=Solid&SupplementData=EAN8&format=PNG" -H "accept: image/png" -H "authorization: Bearer <JWT Token>"
Request URL
https://api.aspose.cloud/v3.0/barcode/generate?Type=Codabar&Text=Hello%20World&TwoDDisplayText=QR&TextLocation=Above&TextAlignment=Center&TextColor=Blue&FontSizeMode=Auto&Resolution=96&TextSpace=2&Units=Point&SizeMode=Nearest&BarHeight=50&ImageHeight=200&ImageWidth=200&RotationAngle=0&BackColor=White&BorderDashStyle=Solid&SupplementData=EAN8&format=PNG
Java
ამ კოდის ფრაგმენტი შეიძლება გამოიყენოს BarCode სურათის გენერაციისთვის და მისი Cloud Storage-ის შენახვისთვის.
// სრული მაგალითებისა და მონაცემთა ფაილებისთვის, გთხოვთ გადაინაცვლოთ https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/
String name = "putBarcodeGenerateFile.png";
String type = EncodeBarcodeType.QR.getValue();
String text = "Put Barcode Generate File";
Double dimensionX = 200.0;
String twoDDisplayText = null;
String textLocation = null;
String textAlignment = null;
String textColor = null;
String fontSizeMode = null;
Double resolution = null;
Double textSpace = null;
String units = null;
String sizeMode = null;
Double barHeight = null;
Double imageHeight = null;
Double imageWidth = null;
Double rotationAngle = null;
String backColor = null;
String barColor = null;
String borderColor = null;
Double borderWidth = null;
String borderDashStyle = null;
Boolean borderVisible = null;
String enableChecksum = null;
Boolean enableEscape = null;
Boolean filledBars = null;
Boolean alwaysShowChecksum = null;
Double wideNarrowRatio = null;
Boolean validateText = null;
String supplementData = null;
Double supplementSpace = null;
String format = null;
String storage = "Storage";
String folder = "Temp/"
ResultImageInfo response =
api.putBarcodeGenerateFile(
name,type,text,twoDDisplayText,textLocation,textAlignment,textColor,fontSizeMode,
resolution,null,null,dimensionX,textSpace,units,sizeMode,barHeight,
imageHeight,imageWidth,rotationAngle,backColor,barColor,borderColor,borderWidth,
borderDashStyle,borderVisible,enableChecksum,enableEscape,filledBars,
alwaysShowChecksum,wideNarrowRatio,validateText,supplementData,
supplementSpace,storage,folder,format);
assertTrue(response.getFileSize() > 0);
assertTrue(response.getImageWidth() > 0);
assertTrue(response.getImageHeight() > 0);

Image 1:- ბარათის წარმოგადგენილი პრივიუ, რომელიც გენერირებულია Java API-ით
ბარათის კოდი აღიარება რასტრული გამოსახულებიდან
API ასევე გთავაზობთ შესაძლებლობებს ბარკოდის ამოცნობისთვის რასტრული სურათების ფაილებიდან. სურათის ფაილი შეიძლება იყოს PNG, JPEG, BMP, GIF, TIFF, ან EXIF ფორმატის. GetBarcodeRecognize მეთოდი API-დან გეხმარებათ ამ მოთხოვნის შესრულებაში. სახელის ველი სავალდებულოა, ხოლო სხვა opcional ველები საშუალებას გაწვდით უკეთესი ამოცნობის ოპერაციების ჩატარებისთვის, რადგან შეგიძლიათ კონკრეტულად მიუთითოთ ბარკოდის ტიპის ინფორმაცია, ChecksumValidation, Encoding, წინასწარ განსაზღვრული პარამეტრები, რაც საშუალებას გაწვდით დაამტკიცოთ ამოცნობის ხარისხი და სიჩქარე, და კიდევ ბევრად მეტი.
cURL
curl -X GET "https://api.aspose.cloud/v3.0/barcode/index.png/recognize?Type=all&ChecksumValidation=Off&DetectEncoding=false&Preset=HighQuality" -H "accept: application/json" -H "authorization: Bearer <JWT Token>"
Request URL
https://api.aspose.cloud/v3.0/barcode/index.png/recognize?Type=all&ChecksumValidation=Off&DetectEncoding=false&Preset=HighQuality
გაარკვიეთ ბარკოდი გარე სურათის URL-დან
// For complete examples and data files, please go to https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/
String type = null;
String checksumValidation = ChecksumValidation.OFF.toString();
Boolean detectEncoding = null;
String preset = PresetType.HIGHPERFORMANCE.toString();
String url = "http://www.barcoding.com/images/Barcodes/pdf417.gif";
Integer rectX = null;
Integer rectY = null;
Integer rectWidth = null;
Integer rectHeight = null;
Boolean stripFNC = null;
Integer timeout = null;
Integer medianSmoothingWindowSize = null;
Boolean allowMedianSmoothing = null;
Boolean allowComplexBackground = null;
Boolean allowDatamatrixIndustrialBarcodes = null;
Boolean allowDecreasedImage = null;
Boolean allowDetectScanGap = null;
Boolean allowIncorrectBarcodes = null;
Boolean allowInvertImage = null;
Boolean allowMicroWhiteSpotsRemoving = null;
Boolean allowOneDFastBarcodesDetector = null;
Boolean allowOneDWipedBarsRestoration = null;
Boolean allowQRMicroQrRestoration = null;
Boolean allowRegularImage = null;
Boolean allowSaltAndPepperFiltering = null;
Boolean allowWhiteSpotsRemoving = null;
Double regionLikelihoodThresholdPercent = null;
List<Integer> scanWindowSizes = null;
Double similarity = null;
Boolean skipDiagonalSearch = null;
String australianPostEncodingTable = null;
String rectangleRegion = null;
File image = null;
BarcodeResponseList response =
api.postBarcodeRecognizeFromUrlOrContent(
type,checksumValidation,detectEncoding,preset,rectX,rectY,rectWidth,rectHeight,
stripFNC,timeout,medianSmoothingWindowSize,allowMedianSmoothing,allowComplexBackground,
allowDatamatrixIndustrialBarcodes,allowDecreasedImage,allowDetectScanGap,
allowIncorrectBarcodes,allowInvertImage,allowMicroWhiteSpotsRemoving,allowOneDFastBarcodesDetector,
allowOneDWipedBarsRestoration,allowQRMicroQrRestoration,allowRegularImage,allowSaltAndPepperFiltering,
allowWhiteSpotsRemoving,regionLikelihoodThresholdPercent,scanWindowSizes,similarity,skipDiagonalSearch,
australianPostEncodingTable,rectangleRegion,url,image);
assertNotNull(response);
assertFalse(response.getBarcodes().isEmpty());
BarcodeResponse barcode = response.getBarcodes().get(0);
assertEquals(DecodeBarcodeType.CODE11.getValue(), barcode.getType());
assertEquals("1234567812", barcode.getBarcodeValue());
შედეგი
ამ სტატიაში ჩვენ განვიხილეთ ნაბიჯები და დაკავშირებული დეტალები იმაზე, როგორ უნდა შექმნათ BarCode პროგრამულად Java-ს გამოყენებით, ასევე როგორ უნდა წაიკითხოთ და აღიაროთ არსებული BarCode Java-ს კოდით. ალბათ შენ შენიშნა, რომ ყველა ეს ოპერაცია შესრულდა რამდენიმე მარტივი კოდის მეშვეობით. არ არის საჭირო დამატებითი პროგრამული უზრუნველყოფის გადმოწერა ან ინსტალაცია, და ამ ოპერაციებს შესაძლებელია ნაკლები კოდით განხორციელება.
დაკავშირებული სტატიაები
მიგვანიჭებთ, რომ მოინახულოთ შემდეგი ბმულები, რათა მეტი იცოდეთ