Skip navigation
Currently Being Moderated

Decode Compressed 2d Barcode PDF417

Jan 19, 2012 3:42 AM

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

 
Replies
  • Currently Being Moderated
    Jan 19, 2012 8:00 AM   in reply to pmoralesm

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 10:13 AM   in reply to pmoralesm

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2012 11:09 AM   in reply to pmoralesm

    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//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZy BJSkcg

    SlBFRyB2NjIpLCBxdWFsaXR5ID0gMTAwCv/bAEMAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ EBAQEB

    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/bAEMBAQEBAQEBAQEBAQ EBAQEB

     

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 20, 2012 7:44 AM   in reply to pmoralesm

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 23, 2012 10:38 AM   in reply to pmoralesm

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points