Create Barcodes By Types

Creates barcodes in supported types

Code Samples

Try the API in the language you prefer

  • C#
  • Java
  • JavaScript
  • PHP
  • Python
  • Ruby
// creating barcode from text
var res = Pdf4me.Instance.BarcodeClient.CreateBarcodeByTypeAsync(BarcodType.QrCode, "example text", null).ConfigureAwait(false).GetAwaiter().GetResult();

// writing generated image to disk
using (var resfile = System.IO.File.OpenWrite('createBarcode.jpg'))
{
    res.Stream.CopyTo(resfile);
}
# setup the barcode_client
barcode_client = BarcodeClient(pdf4me_client)

# reading the PDF
res = barcode_client.create_barcode_by_type(
        barcode_type='qrcode',
        content='example text'
    )

# writing the generated PDF to disk
with open('createBarcode.jpg', 'wb') as f:
    f.write(res)
// creating barcode from text
$res = $client->pdf4me()->createBarcodeByType([
        "barcodType" => "qrCode",
        "content" => 'example text'
    ]);

// writing generated image to disk    
file_put_contents('createBarcode.jpg', $res);

Important Links

Swagger - Create Barcodes By Types