Skip navigation
Currently Being Moderated

How to Define a Dynamic Barcode on a PDF Page?

Jan 26, 2012 8:04 AM

I have a situation where we have a PDF form with multiple rows, (rows can be added as per the user's requirement), means user can click AddRow button and pdf will generate a new row to fill the data. There is no max limit of the rows, it vary and can be anywhere from row 1..10, 1..100, or 1..50 and so on.....

The first pice of the form is to create table/row with Add Row button has been completed. I have already added the AddRow button functionality into the form, but we also need to point the row's data to the barcode. Each data row should point to a single barcode 1 to 1 bases (One row one barcode). How to implement and design the barcode so that each row will be handled dynamically with one barcode? Or, if there is any better approach to handle this.

 

I would really appreciate if you could send any document, example or sample.

Thanks!

 
Replies
  • Currently Being Moderated
    Jan 26, 2012 10:22 AM   in reply to apervez

    What you need to do is combine all of your data using a collection routine and then a pre-print routine that will spread the data across a dynamic number of barcodes for you. Tai Kedzierski actually has a great post on this topic on the cookbooks here: http://cookbooks.adobe.com/post_How_to_vary_the_number_of_barcodes_acc ording_to_th-16499.html.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2012 5:54 AM   in reply to apervez

    What you basically need to do is move all of the xfa data into a single field (textarea, or just an internal node) and then do your barcode calculations on that single field. I'll see if I can't dig up another sample.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2012 6:04 AM   in reply to apervez

    Hi apervez,

     

    You need firstly to use a Paper Forms Barcode (PFB hereon). No other will do.

     

    Secondly, you will probably want to have each PFB under the same parent node as the fields it is coding for

     

    So that thirdly, you can access the row instance and its children and use the rawValues to populate the PFB in the calculate script event.

     

    Note that PFB will come with custom scripting in the calculate event. Delete that script, and simply use this.rawValue = field1.rawValue + field2.rawValue + ... etc

     

    Note that only the PFB can be updated whilst the PDF is open. Any other barcode needs to have its content set at design time, and will always be Read-Only or Protected.

     

    Any specific example, please let us know.

     

    Tai

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 11:26 AM   in reply to apervez

    Consider the following scenario:

     

    if you have defined a table and made a Cell in the table contain a TextField and it repeats, the SOM expression would look this

    form1.Table1.Row1.TextField1[0] (Cell1 of Row1) as an example.

     

    This instance of TextField[0] can be captured in the barcode Collection via the collection UI, but there is no way through the UI to get form1.Table1.Row1.TextField[1] (second instance) included in the barcode data.

     

    I would check this blog entry out if you are interested in capturing values for repeating objects in a barcode, such as you might find in a dynamic table of a dynamic form:

     

    http://blogs.adobe.com/formfeed/2010/02/paperforms_2d_barcodes_with_re .html

     
    |
    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