Here are two barcode symbols that both encode the string “12345678”:
Which of these codes is a 2D code? The one on the right is Datamatrix code, a true two dimensional code. The one on the left is PDF417, a stacked linear code; it looks like a two dimensional barcode, but it isn’t.
2D codes store data in both the X and Y coordinates. Linear codes only contain data in one dimension. This is easy to see in a normal linear code.
It doesn’t matter where the scanner goes across the code, data is only encoded in the widths of the bars and spaces. Datamatrix characters are encoded in a matrix of 5 by 5 cells and have to be read by a camera.
Stacked linear codes are really a bunch of small linear barcodes stacked on top of one another. Each row has a row indicator or number, so a 1D scanner such as a laser is capable of reading these codes by sweeping across the code while the decoder keeps track of the row numbers and puts together the final output. Check the specs of your scanner, not all 1D scanners will read PDF417 symbols.
Note the size difference between the PDF417 and the Datamatrix symbol above. Not many new applications use PDF417 because of the size and density advantage of Datamatrix.