This example uses VISA to write data to the parallel port. NI-VISA 1.1 was the first version that supported parallel communications. If you have an earlier version, this example will not work. When using the parallel port, pins 2-9 are data pins with pin 9 being the most significant bit. Also, pins 11 (printer busy) and 12 (printer out of paper) must be grounded to transmit data.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.