PNG JPG BMP TIFF SVG
Aspose.BarCode  for Python via Java
DotCode

สร้างป้ายกำกับ DotCode ด้วย Python via Java

สร้าง บาร์โค้ด DotCode ใน Python โดยใช้ Aspose.BarCode ฝั่งเซิร์ฟเวอร์สำหรับ Python via Java API

How to Generate บาร์โค้ด DotCode Using Python via Java

หากต้องการสร้างรูปภาพ บาร์โค้ด DotCode ให้ดาวน์โหลด Aspose.BarCode for Python ผ่าน Java API ซึ่งมีคุณลักษณะหลากหลาย ทรงพลัง และใช้งานง่าย - ใช้ไลบรารีบาร์โค้ดสำหรับแอปพลิเคชันที่ใช้ Python รับเวอร์ชันล่าสุดโดยตรงจากพอร์ทัล Aspose releases หรือติดตั้ง ‘aspose-barcode’ จาก pip ด้วยคำสั่งต่อไปนี้:

Command

  pip install aspose-barcode 

ขั้นตอนในการสร้าง บาร์โค้ด DotCode ใน Python

Aspose.BarCode ช่วยให้นักพัฒนาสร้างภาพ บาร์โค้ด DotCode ได้ง่ายด้วยโค้ดไม่กี่บรรทัด

  • สร้างวัตถุใหม่ของคลาส BarCodeGenerator
  • กำหนดประเภทบาร์โค้ดที่ต้องการเป็นพารามิเตอร์ EncodeTypes
  • แทรกข้อความอินพุตเป็นพารามิเตอร์ที่สอง
  • เรียกใช้เมธอด BarCodeGenerator.save เพื่อรับอิมเมจ บาร์โค้ด DotCode ที่สร้างขึ้น

ความต้องการของระบบ

API บาร์โค้ด Aspose รองรับโดยแพลตฟอร์มและระบบปฏิบัติการหลักทั้งหมด ก่อนดำเนินการตามตัวอย่างโค้ดด้านล่าง โปรดตรวจสอบว่าคุณได้เปิดใช้งานข้อกำหนดเบื้องต้นต่อไปนี้ในระบบของคุณแล้ว

  • Microsoft Windows, Linux หรือระบบปฏิบัติการใดๆ ที่เข้ากันได้กับสภาพแวดล้อมการพัฒนา Python
  • Java 8 หรือสูงกว่า
  • Python 3.6 หรือสูงกว่า

Code to be executed - Python


from asposebarcode import Generation

class BarcodeGeneratorExamples():
    def generateBarcodeImageExample(self):
        generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DotCode, "")
        generator.getParameters().getBarcode().getCodeTextParameters().setLocation(CodeLocation.Below)
        generator.getParameters().getBarcode().getXDimension().setMillimeters(2)
        generator.save("example.png", "PNG")

barcodeGeneratorExamples = BarcodeGeneratorExamples()
barcodeGeneratorExamples.generateBarcodeImage()
Generation result