Trim spaces on the right of the input value (code128) #292
-
|
Hi, I have text values that are set by an external software (it does find&replace for placeholders) and the values have spaces at the right (to fill the maximum field length I suppose). I am new in postscript and trying to find a working example of trimming right spaces before calling the /code128 barcode generator. No success so far. Is there an option in postcriptbarcode generators to do the trim? Or any well known postscript template that makes the same? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Just ask ChatGPT:
ChatGPT output: In PostScript, there isn't a built-in right-trim function, but you can create one fairly easily. The postscriptbarcode library doesn't have a built-in trim option, so you'll need to handle this before passing the data to the barcode generator. Here's PostScript code that uses a function to trim right spaces: [ The usual waffle ensues... ] |
Beta Was this translation helpful? Give feedback.
Just ask ChatGPT:
ChatGPT output:
In PostScript, there isn't a built-in right-trim function, but you can create one fairly easily. The postscriptbarcode library doesn't have a built-in trim option, so you'll need to handle th…