1

Anyone know of a way to set a local printer port to use a system variable or some form of method to create a counter or unique identifier.

I currently have a printer setup where I have a new port as \\someserver\share\printjob.pcl

This then creates a PCL 5 file for the print job but I am wondering if there is a way to set a system variable to be acknowledged, like %username% so it generates something unique if multiple users are printing jobs.

Ultimately, I am converting the PCL file to a PDF via a custom VBScript service. unfortunately there is room for it stepping on itself which I want to try and avoid.

Malachi
  • 1,063
ATek
  • 556
  • 1
  • 5
  • 11

1 Answers1

1

You can use separation pages for this. Windows comes with a number of pre-defined separation pages but you need to enable separation pages from Printer Properties > Advanced tab > Separation Pages. Select the file you want (e.g. PCL.SEP) from C:\Windows\System32

You can modify the selected file. The Username (@N) is normally included in the default file, but you can add or put it somewhere else. You can also include the contents of a specified text file (@Fpathname). That file can contain the text you want. Alternatively, depending on which is easier for you, you can just add the text to the sep file (@T). If you really need a counter, then you may need to use some script to create the text file with the data.

The required syntax is available from Microsoft Support.

hdhondt
  • 4,374