Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Decode Compressed 2d Barcode PDF417

Avatar

Level 2

Hi All,

I have a form and I'm using a PDF417 barcode to store all XML data.

The form is big and I need to compress data.

That is the part I already did... What I need now is how to uncompress

the data in workbench after I use Decode operation from Barcoded Forms

and save the XML.

After decode I got binary data...

How can I uncompress a compressed PDF417?...

thanks to all

9 Replies

Avatar

Level 4

You dont have to do anything different to decompress.

In workbench, what is your output variable on the Barcode.Decode step?

Is it defined as xml?

Did you print+scan your input file?  The Barcode.Decode can't read the barcode from a interactive form.  It must be flattened, no xml hierarchy.

What does the adobe.log say when you run it?

Avatar

Level 2

Hi

You are correct, it decompress with no problem---

But I have another issue, if I use an external program I got an XML with

binary data inside wich is the pdf417 content.

How can I uncompress it using C# without using any LC service?...

2012/1/19 g5spark <forums@adobe.com>

**

Re: Decode Compressed 2d Barcode PDF417 created by g5spark<http://forums.adobe.com/people/g5spark>in

LiveCycle Barcoded Forms ES - View the full discussion<http://forums.adobe.com/message/4151954#4151954>

Avatar

Level 4

binary data passed in a xml is encoded in base64 but i dont think thats your problem.  If it is, then you need to convert it back to binary.

I dont know c#, but i did find this..

Syste.Convert.ToBase64String(toEncodeAsBtytes)

System.Convert.FromBase64String(encodedData)

I think your problem is that you dont know how the data was compressed in the barcode.  In otherwords, if you created the pdf form in designer and checked the compress data parameter then the LC Barcode.Decode will be able to decompress it.  If some other program compressed it, LC Barcode.Decode isn't going to know what compression algorithm was used to compress it, so it wont be able to decompress it.

Avatar

Level 2

Exactly! The problem now is to decode outside LC using C#. I don't know if

the content of the compressed barcode is in base64 or not, maybe is just

zipped.

I'll try to find out...

2012/1/19 g5spark <forums@adobe.com>

**

Re: Decode Compressed 2d Barcode PDF417 created by g5spark<http://forums.adobe.com/people/g5spark>in

LiveCycle Barcoded Forms ES - View the full discussion<http://forums.adobe.com/message/4152319#4152319>

Avatar

Level 4

Take a look at this website

http://www.motobit.com/util/base64-decoder-encoder.asp

Is the content of your binary in characters alphanumeric?

/9j/4AAQSkZJRgABAQAAAQABAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcg

SlBFRyB2NjIpLCBxdWFsaXR5ID0gMTAwCv/bAEMAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB

AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/bAEMBAQEBAQEBAQEBAQEBAQEB

OR is it a bunch of letters, and symbols?

ÿØÿà  JFIF          ÿþ <CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100

ÿÛ C                                                                 ÿÛ C                                                                 ÿÀ    X   "       ÿÄ                            

ÿÄ µ                }        !1A  Qa "q 2‘¡ #B±Á RÑð$3br‚

     %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ                 

The 1st one is base64.  The 2nd is binary.

Avatar

Level 1

There is a trick to the compression and decompression for the barcode. The barcode itself is FLATE compressed. However, you need to drop the first 2 bytes of the data stream to DEFLATE the data outside of LiveCycle.

Lee.

Avatar

Level 2

Thanks Lee for your help,

I've attached 1 xml file, there is one field that has a property called

value that has the compressed "data"... I have to convert that data into

the original xml data...

The original uncompressed data I have to obtain from the compressed data is

the following:

Again, thanks for any tips you can give me...

Pablo

Avatar

Level 1

Pablo, if you are able to extract XML from the barcode decode then technically, you should have your data. Again, dropping the first 2 bytes of the data stream before you run the data through a DEFLATE process should provide you with the extracted data you're looking for.

Avatar

Former Community Member

Have you ever read this post? It seems someone posted the same PDF 417 barcode decoding question here.

Google Groups