function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kent ManningKent Manning 

How to create barcodes with visualforce rendered as PDF

We would like to create a bar code of the case number. This would then go onto a PDF document that is generated via visualforce.  How do i generate the code to produce the barcode with visualforce and an Apex controller?   Any help or suggestions would be appreciated. 

Best Answer chosen by Admin (Salesforce Developers) 
Puja_mfsiPuja_mfsi

Hi,

You can create a text formula field in case object . And use the below formula in it :

 

IMAGE("http://www.barcodesinc.com/generator/image.php?code="+CaseNumber +"&style=325&type=C128B&width=200&height=50&xres=1&font=3" ,"Barcode")

 

Please let me know if u have any problem on same and if this post helps you,please throw KUDOS by click on star at left.

All Answers

Vinita_SFDCVinita_SFDC

Hi,

 

As of now it is not possible to generate barcode in salesforce. There are few apps, listed in below link, which provide this functionality.

 

https://appexchange.salesforce.com/results?keywords=barcode

 

Also, if you wish to have this feature in salesforce in near future then please vote this idea on ideaexchange portal. Link:

 

https://success.salesforce.com/ideaView?id=08730000000Bq2aAAC

 

 

Puja_mfsiPuja_mfsi

Hi,

You can create a text formula field in case object . And use the below formula in it :

 

IMAGE("http://www.barcodesinc.com/generator/image.php?code="+CaseNumber +"&style=325&type=C128B&width=200&height=50&xres=1&font=3" ,"Barcode")

 

Please let me know if u have any problem on same and if this post helps you,please throw KUDOS by click on star at left.

This was selected as the best answer
Kent ManningKent Manning

Thanks Puja_mfsi! This will get me much closer to my goal.

kumar_arunkumar_arun
Thanks .Puja_mfsi . i had  same requirement and done this with your help. thanks again.
Nikhil M KumarNikhil M Kumar
Hello Puja_mfsi, the suggested solution doesn't work with a 'Visualforce page rendered as PDF'. Could you check this out?