Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

how we can populate the form data from 2D barcode

Avatar

Former Community Member
Hi All,



Can anyone tell me how we can populate the form data from 2D barcode, will this can be done through script(javascript)?.



Thanks & Regards,

Faisal Afzal
2 Replies

Avatar

Former Community Member
Hi Faisal,



This really depends on what products you have available to you. If you have Adobe LiveCycle Barcoded Forms ES then your process would look something like this:



- Decode the PDF or TIF image to extract the data from the barcode

- Convert the extracted data into XML so that it may be easily mapped to your form

- Reformat the data into a format that can be used to pre-populate your form, or use the converted data as-is if the format is acceptable

- Import the data into your form using the import data service



Each of these steps is a single service in LC ES and are provided with the Barcoded Forms ES product.

Avatar

Level 1

I was hoping someone could put me in the right direction here. I am basically doing the same . I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the  Decode->Extract XML process.

The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)

<?xml version="1.0" encoding="UTF-8"?>

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">

<xfa:datasets>

<xfa:data>

<form1>

The XML structure that is expected by the PDF template is as follows

<?xml version="1.0" encoding="UTF-8"?>

<form1>

So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.

Thanks