The Data Matrix is a two-dimensional barcode consisting of black and white "cells" or modules arranged in either a square or rectangular pattern, also known as a matrix. The information to be encoded can be text or numeric data.
IMAGE('https://barcode.tec-it.com/barcode.ashx?data='+ Name + '&code=DataMatrix&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23ffffff&qunit=Mm&quiet=0&dmsize=Default', 'DataMatrix Code')

To make this DataMatrix code render properly on PDF page We need to add this URL ( https://barcode.tec-it.com ) to a remote site setting.
To generate DataMatrix code in Salesforce for object records fields, I am going to use this website (https://barcode.tec-it.co m/) which provided all kinds of barcode generation url.
Below are steps to generate DataMatrix code.
Create a custom formula field on the Object.
The generated DataMatrix code will show on Account record detail page.

Now, show this DataMatrix code on the Visualforce page (Render page as PDF).
<apex:page standardController="Account" renderAs="pdf" docType="html-5.0">
<apex:form >
<apex:outputText value="{!account.DataMatrix_Code__c}" escape="false" style="float:right;"/><br/><br/>
Name: <apex:outputText value="{!account.Name}"/><br/>
Email: <apex:outputtext value="{!account.AccountNumber}" />
</apex:form>
</apex:page>
Output: As you can see DataMatrix code is not showing properly on PDF page.
It's so nice article thank you for sharing a valuable content. google cloud online course
ReplyDeleteGreat Article Cloud Computing Projects
DeleteNetworking Projects
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
This is an awesome post. Really very informative and creative writing about barcode. This concept is a good way to know the facts about barcode more. I like it and help me to develop my ideas very well. Thank you for this explanation and nice information. Buy Cheap Ean Barcode
ReplyDelete