Find your content:

Search form

You are here

Generating Barcodes in Salesforce

 
Share

Is there any standard/ acceptable way of generating barcodes in salesforce? I'm exporting some pdf reports and there I need to print a barcode. I found some third party libraries like this.
But when we apply renderAs="pdf" is it still possible to do client side script calling?
If not do I need to pre-generate the barcode for each and render it as jpg or similar? As it looks like this is kind of hot topic on success.SFDC.
What is the optimum way for this.


Attribution to: highfive

Possible Suggestion/Solution #1

Google used to have nice QR code image api: https://google-developers.appspot.com/chart/image/ but it's deprecated and I don't think it ever generated barcodes.

There are some online tools that you might be able to use (I haven't tried any of these, no idea what's the catch, possibly you should contact them if you expect heavy usage and make some arrangements)...

From what I remember there's a small catch if you want image to be rendered in PDF - so whichever API you'll use I recommend playing first with normal HTML page and adding the renderAs later. The catch is that it must be "safe" to request that image, you need to convince SF you know what you're doing ;)

For regular Documents it means they should be marked as "externally available image" (and pay attention to the "oid" in the link). For calls to non SF domains - you need to add the domain to Setup > Security Controls > Remote Site Settings.


Attribution to: eyescream
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34068

My Block Status

My Block Content