25 Replies Latest reply on Apr 3, 2008 4:24 AM by HowardTreisman

    capuring data from barcoded froms

    aoatak Level 1
      Hi, I defined a simple workflow initiated by watched folder endpoint. workflow has 2 processes: decode and extractToXML. I copy a pdf file to input directory of the watched folder and get the below exception:<br /><br />aused by: ALC-BCF-002-004: PDFException. Caused by: com.adobe.internal.pdftoolkit.core.exceptions.PDFException: Processing of barcode images in dynamic PDF form not supported: No 'page content' found<br />     at com.adobe.barcodedforms.decoder.image.PDFImageIterator.<init>(PDFImageIterator.java:82)<b r />     at com.adobe.barcodedforms.decoder.image.ImageIteratorFactory.getInstance(ImageIteratorFacto ry.java:42)<br />     at com.adobe.barcodedforms.decoder.reader.BarcodeReader.decode(BarcodeReader.java:67)<br />     at com.adobe.livecycle.barcodedforms.BarcodedFormsService.decode(BarcodedFormsService.java:2 92)<br />     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        • 1. Re: capuring data from barcoded froms
          Jasmin Charbonneau Level 4
          Make sure you save your XDP/PDF as a static PDF when you use barcodes.

          Jasmin
          • 2. Re: capuring data from barcoded froms
            aoatak Level 1
            What do you mean by Static PDF? In my process I have to use an interactive pdf form. Can you give any links to any additional information?
            • 3. Re: capuring data from barcoded froms
              aoatak Level 1
              P.S. I use Acrobat Pro to fill in the form.
              • 4. Re: capuring data from barcoded froms
                Jasmin Charbonneau Level 4
                When you create a PDF with Form Designer it can be Static or Dynamic. Static means the layout won't change and dynamic means the layout can change (show hide a section, a page, etc).

                The the PDF can be interactive of non-interactive(flat). Interactive mean a user can interact with the document. The most common way is to enter information in fields. Non-Interactive means the user can't interact with the PDF. This is the case when the PDF is for print purpose.

                Make sure your PDF is static and interactive.

                Jasmin
                • 5. Re: capuring data from barcoded froms
                  kc@dafolo.dk Level 1
                  Hi again,

                  Is it possible in the Workbench to "convert" a dynamic PDF into a static one? If this is possible you can still use your dynamic PDF's with barcodes and just "convert" before you decode it in Workbench?

                  Is this possible in any way?

                  Sincerely
                  Kim
                  • 6. Re: capuring data from barcoded froms
                    kc@dafolo.dk Level 1
                    As you might have guessed I am also experimenting with barcodes. In my scenario I have scanned the barcode (with a document scanner to PDF) and drops it in a watched folder.

                    When I process it with the decode-service I get some xml out which is not at all like the xml I normally get from the form I am using. I get something like the following:

                    <xb:scanned_image xmlns:xb="http://decoder.barcodedforms.adobe.com/xmlbeans" path="pdf" version="1.0">
                    <xb:decode>
                    <xb:date>2008-02-29T13:45:50.326+01:00</xb:date>
                    <xb:host_name>dafolo25.dafolo.local</xb:host_name>
                    <xb:status type="success">
                    <xb:message/>
                    </xb:status>
                    </xb:decode>
                    <xb:barcode id="1">
                    <xb:header symbology="pdf417">
                    <xb:location page_no="1">
                    <xb:coordinates>
                    <xb:point x="0.0" y="-0.06313131"/>
                    <xb:point x="0.9722222" y="-0.06313131"/>
                    <xb:point x="0.9722222" y="1.0"/>
                    <xb:point x="0.0" y="1.0"/>
                    </xb:coordinates>
                    </xb:location>
                    </xb:header>
                    <xb:body>
                    <xb:content encoding="utf-8">fld_DatoCPRnummer ></sub_Barn2 ><sub_Tilknyttede2 ><rbt_OmraadecenterBestemmer /><fld_Sagsbehandler /><fld_Dagtilbud /><fld_Skole /><fld_Andet /></sub_Tilknyttede2 ></Side1 ></form1 >36</fld_Adresse ><fld_PostBy >0100 Kikkebakkeboligby</fld_PostBy ><fld_Email >kc@dafolo.dk</fld_Email ><fld_EftervaernDatoK >29.02.2008</fld_EftervaernDatoK ><rbt_CivilstandsBestemmer >1</rbt_CivilstandsBestemmer ></sub_Ansoeger ><sub_Sambo ><fld_Navn /><fld_DatoCPRnummer /></sub_Sambo ><sub_Boernudenberegning ><fld_Antal /><fld_DatoCPRnummer1 /><fld_DatoCPRnummer2 /><fld_DatoCPRnummer3 /></sub_Boernudenberegning ><sub_Barn1 ><fld_Barnetsnavn >Pernille Kjeldsen</fld_Barnetsnavn ><rbt_Friplads >2</rbt_Friplads ><fld_DatoCPRnummer >160191-2038</fld_DatoCPRnummer ></sub_Barn1 ><sub_Tilknyttede1 ><rbt_OmraadecenterBestemmer /><fld_Sagsbehandler /><fld_Dagtilbud /><fld_Skole /><fld_Andet /></sub_Tilknyttede1 ><sub_Barn2 ><fld_Barnetsnavn >Amanda Hansen</fld_Barnetsnavn ><rbt_Friplads >2</rbt_Friplads ><fld_DatoCPRnummer >030904-9004</fld_DatoCPRnummer ></sub_Barn2 ><sub_Tilknyttede2 ><rbt_OmraadecenterBestemmer /><fld_Sagsbehandler /><fld_Dagtilbud /><fld_Skole /><fld_Andet /></sub_Tilknyttede2 ></Side1 ></form1 ></xb:content>
                    </xb:body>
                    </xb:barcode>
                    </xb:scanned_image>

                    I am wondering what the coordinates tag is for, and if there is a way to get the formatting and order of the tags corrected in the xml output without manipulating it my self.

                    I hope you can help me with this issue

                    Sincerely
                    Kim
                    • 7. Re: capuring data from barcoded froms
                      Level 1
                      Use the output from the decode operation as input to the Extract To XML operation - the result is XDP data.

                      http://livedocs.adobe.com/livecycle/es/wb_help/00000816.html
                      • 8. Re: capuring data from barcoded froms
                        kc@dafolo.dk Level 1
                        Yes - thank you, that made the xml-encoding much better, however the order of the fields are still garbled.

                        My xml-structure looks like this:

                        <form1>
                        <mySubform>
                        <myElement>Element1<\myElement>
                        <myElement2>Element2<\myElement2>
                        <\mySubform>
                        <\form1>

                        but the result from the Extract-To_XML service gives:

                        <myElement>Element2<\myElement>
                        <\mySubform>
                        <form1>
                        <mySubform>
                        <\form1>
                        <myElement>Element1<\myElement>

                        I guess that my error is in the setup of the decoder-service or in the barcode, but I really cannot see what I am doing wrong...

                        Please help.

                        Sincerely
                        Kim
                        • 9. Re: capuring data from barcoded froms
                          kc@dafolo.dk Level 1
                          Hi again,

                          I just forgot to say that I have scanned a printed form with a barcode with a pdfmailer/scanner and just dropped the output-pdf in the watched folder. Should this pose any trouble?

                          Sincerely
                          Kim
                          • 10. Re: capuring data from barcoded froms
                            Level 1
                            Scanning the image as PDF and dropping to watched folder is a common usage.

                            I asked a colleague about the malformed XML....

                            scott
                            • 11. Re: capuring data from barcoded froms
                              kc@dafolo.dk Level 1
                              Hi again Scott,

                              Thanks for your effort - I really appreciate it.

                              I have just tried to change the barcode to not to compress the barcode before creating the barcode. This seems to help - is this a known issue or is it just a coincidence?

                              Sincerely
                              Kim
                              • 12. Re: capuring data from barcoded froms
                                kc@dafolo.dk Level 1
                                Hi again Scott,

                                Have you heard anything from your cooleague about this issue?

                                SIncerely
                                Kim
                                • 13. Re: capuring data from barcoded froms
                                  Level 1
                                  Hi Kim, it sounds like you are embedding XML in the barcode and then using the convert to XML service, is this the case?

                                  Try using the default tab delimited format including field names and you should not run into any problems.

                                  Lee.
                                  • 14. Re: capuring data from barcoded froms
                                    kc@dafolo.dk Level 1
                                    Yes, I am trying to capture the xml in my barcodes.

                                    The reason for this is that the output from the barcode should follow the standard hierarchy which is stored in the hierarchy of the form elements (sometimes two fields can have the same name within different subforms). The solution that I am creating must conform to this xml-standard as the data might be used for other purposes than just workspace-usage.

                                    Is it at all possible to use the delimitter-tab option and still preserve this requirement?

                                    I hope you can help me with this issue - as capturing the XML in a barcode seems almost as an impossible task for even simple forms.
                                    • 15. Re: capuring data from barcoded froms
                                      Level 1
                                      The tab delimited option is probably your best alternative as it can be converted automatically into XML by using the barcode conversion service. XML inside PDF417 barcodes is generally very limited because of the fact that the tags and special characters take up so much space.

                                      For a full explanation on the space requirements, take a look at this presentation that I put together: http://my.adobe.acrobat.com/barcodedformselearningpdf417bestpractices/

                                      Barcode Capacity-wise if you were to drag and drop the address block from Designer's customer library onto a form, without data you'd have 72 characters in a tab-delimited format (includes field names) and 189 with XML.
                                      • 16. Re: capuring data from barcoded froms
                                        kc@dafolo.dk Level 1
                                        Hi again,

                                        OK - this sounds great. Now I am just wondering - will the delimited tab structure reflect the structure of the hierarchy or the structure of the xml-schema if it is attached/embedded into the form?

                                        Thanks for your effort so far Lee - I really appreciate it.

                                        Sincerely
                                        Kim
                                        • 17. Re: capuring data from barcoded froms
                                          Level 1
                                          The structure on the back end is not going to reflect the schema that you are looking for up-front but you can easily put together some XSLT that will transform the xml output into the format you need.

                                          XSLT could be re used throughout your organization so nothing "proprietary" to your application.
                                          • 18. Re: capuring data from barcoded froms
                                            kc@dafolo.dk Level 1
                                            Hi again - I can not make the barcode that is generated for my formdata to contain all data unless I use compression, however when I use compression the xml I get from the Extract to XML service is REALLY garbled (e.g. with numeric values assigned to a name field and so on). What can I do to make compression work for my forms when I use the Extract-to XML service?
                                            The only setting that I m unsure of is the "Line delimitter" and "Field-delimitter". In Designer I have set the "Delimitter" setting to "Tab" but in Workbench I don't know which setting I should use for the fields mentioned above...

                                            Please help me

                                            Sincerely
                                            Kim
                                            • 19. Re: capuring data from barcoded froms
                                              Level 1
                                              Have you considered putting more than one barcode on the form to avoid using compression?
                                              • 20. Re: capuring data from barcoded froms
                                                kc@dafolo.dk Level 1
                                                Hi again,

                                                Yes - I have considered putting more than one barcode on the form, but this solution is less applicable in my scenario as some of the forms I need to put barcodes on is pretty big. In fact not using compression would require more than six or seven barcodes - which in my opinion is not a good solution (using a hand held scanner).

                                                I am still wondering what goes wrong when I am using compression, can anybody help me with this? Is the compression functionality still under development or is my problem a solo-glitch?

                                                Please help

                                                Sincerely
                                                Kim
                                                • 21. Re: capuring data from barcoded froms
                                                  Level 1
                                                  You can not use compression with hand held scanners. The compression mechanism is FLATE but I have yet to find a hand scanner that can decompress FLATE.

                                                  The only way around this with a hand scanner is to have the hand scanner write the raw data to disk and have a back-end process deFLATE the data (and skip the first 2 bits in the data-stream).
                                                  • 22. Re: capuring data from barcoded froms
                                                    kc@dafolo.dk Level 1
                                                    Hi again - and thanks for your reply Lee.

                                                    Infact what you suggest is also my intention (I might use one of the 2d barcode APIs which is available outthere for creating the decompression mechanism). But this does not solve the problme that exist with the decode-service in Livecycle as it will still produce errorneous data sets from the barcode (like described above). Hope one of you can explain what I can do to avoid this problem.

                                                    Thanks in advance

                                                    Sincerely
                                                    Kim
                                                    • 23. Re: capuring data from barcoded froms
                                                      kc@dafolo.dk Level 1
                                                      Hi Lee,

                                                      Could you give me a pointer to where I should look for help on usage of XSLT within LiveCycle?

                                                      I am trying to make my output from the barcode follow a schema I have created for my form.

                                                      Thanks in advance

                                                      Sincerely
                                                      Kim
                                                      • 24. Re: capuring data from barcoded froms
                                                        Level 1
                                                        If you're not familiar with XSLT then I would highly recommend picking up a copy of Altova MapForce.  You can get the standard version for US$ 269 which allows you to graphically map from one schema definition to another and then generate the XSLT required to do the mappings.  There is a fully functional 30-day trial if you would like to try it out first.<br /><br />Once you have your XSLT ready, drag and drop the XSLT Transform Service into your process. <br /><br />Here are a few tips:<br /><br />- Leave the Factory Name blank.  You need only specify this parameter if you would to change the factory being used.<br />- The XML Source should be the source of the XML that you would like to be input into your transformation process (NOT THE LIST, a single XML document or a document in your list)<br />- The transformation result is the XML variable for your output.<br />- For the XSLT Source, click on the properties of the literal value and you'll be provide with a window that lets you paste in the appropriate XSLT, another for some test XML, and a result Window to show you how the service will operate.<br /><br />If you do run into problems, use the Variable Logger to see what your XML data looks like prior to running the transformation service and copy the contents of your XML input variable into the XSLT service test window.  Make sure this works before testing the whole process.<br /><br />If you run into an output error, remove the entire "<xsl:output...>" line from the XSLT generated by MapForce.
                                                        • 25. Re: capuring data from barcoded froms
                                                          HowardTreisman Level 1
                                                          This is a great starting point:
                                                          http://www.w3schools.com/xsl/default.asp
                                                          Howard
                                                          http://www.avoka.com