← Back to list

How to generate a EAN-8 barcode as a PNG file in Salesforce Apex

I’m going to take a guess that you are not enthused at the idea of figuring out barcode generation using Apex. It’s definitely not my…

Cloudmersive · 2020-07-11 04:08 · 0 claps · 0.8 min read
#ean-8 #barcode #salesforce #apex #generate
Open on Medium ↗
Wiki topics: CRY · Crypto & Web3 CRM · Email & CRM

How to generate a EAN-8 barcode as a PNG file in Salesforce Apex

I’m going to take a guess that you are not enthused at the idea of figuring out barcode generation using Apex. It’s definitely not my choice for an evening’s entertainment. However, there is hope in sight. I am here today to show you how to set up a barcode generation system for EAN-8 that will be ready in just a few short minutes, with minimal effort required.

First we will need to download this file and extract the client folder to our project:

https://github.com/Cloudmersive/Cloudmersive.APIClient.Apex.Barcode/archive/master.zip

Now we can go ahead and call our barcode generation function:

SwagGenerateBarcodeApi api = new SwagGenerateBarcodeApi();
SwagClient client = api.getClient();
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) client.getAuthentication('Apikey');
Apikey.setApiKey('YOUR API KEY');
Map<String, Object> params = new Map<String, Object>{
'value' => 'value_example'
};
try {
// cross your fingers
Blob result = api.generateBarcodeEAN8(params);
System.debug(result);
} catch (Swagger.ApiException e) {
// ...handle your exceptions
}

Whew! Already done.


메타데이터
post_id
2ead960c73f2
slug
how-to-generate-a-ean-8-barcode-as-a-png-file-in-salesforce-apex-2ead960c73f2
url
https://medium.com/@cloudmersive/how-to-generate-a-ean-8-barcode-as-a-png-file-in-salesforce-apex-2ead960c73f2
canonical_url
https://medium.com/@cloudmersive/how-to-generate-a-ean-8-barcode-as-a-png-file-in-salesforce-apex-2ead960c73f2
author_url
https://medium.com/@cloudmersive
status
ok
fetched_at
2026-07-28 23:30:16