2015 Apr 02 3:01 PM
Hi all,
I should print signatures stored in TROY printer through SAP script. I am passing the below code and it is working fine.
| /: | HEX TYPE PCL | |||
| /= | 1B28323031511B2873307032683732763073306232303154 | "escape sequence to choose image | ||
| /= | 1B2a7031353939783239353759616263646566 | "position command followed by font "abcdef" | ||
| /: | ENDHEX |
But in my scenario, a set of different font escape sequences are stored in a custom table. And I should pick from that table and pass it to the script from my print program. Hence, I passed my font escape sequence through a variable as below, whereas its not working. It just prints the font "abcdef" as it is.
| /: | HEX TYPE PCL | |
| /= | &GV_SIGN1& | |
| /= | 1B2a7031353939783239353759616263646566 | |
| /: | ENDHEX |
From my analysis, the hard-coded second line is working fine (both positioning and font printing). Whereas the first line, which I have passed as a variable(image choosing) is not working. Can anyone with prior experience with this kind of scenario in signature printing help?
Regards,
Shanthi Priya
2015 Apr 08 12:59 PM
Hi ShanthiPriya,
Based on SAP Help on this issue which states "SAPscript does not interpret the data enclosed by the HEX and ENDHEX command pair, but inserts it unchanged into the output stream. ", thus my conclusion is that the variable is not replaced with its value but is sent to the printer as the variable name itself. Since the printer does not understand the variable name it leaves it, I guess.
Below is the link to SAP Help.
Thus, I guess you will simply have to hardcode the value.
Hi all,
I should print signatures stored in TROY printer through SAP script. I am passing the below code and it is working fine.
| /: | HEX TYPE PCL | |||
| /= | 1B28323031511B2873307032683732763073306232303154 | "escape sequence to choose image | ||
| /= | 1B2a7031353939783239353759616263646566 | "position command followed by font "abcdef" | ||
| /: | ENDHEX |
But in my scenario, a set of different font escape sequences are stored in a custom table. And I should pick from that table and pass it to the script from my print program. Hence, I passed my font escape sequence through a variable as below, whereas its not working. It just prints the font "abcdef" as it is.
| /: | HEX TYPE PCL | |
| /= | &GV_SIGN1& | |
| /= | 1B2a7031353939783239353759616263646566 | |
| /: | ENDHEX |
From my analysis, the hard-coded second line is working fine (both positioning and font printing). Whereas the first line, which I have passed as a variable(image choosing) is not working. Can anyone with prior experience with this kind of scenario in signature printing help?
Regards,
Shanthi Priya
2015 Apr 08 12:49 PM
Hi ShanthiPriya,
What is the data type for GV_SIGN1? Assuming it is char type, in that case, it wouldn't work. Generally any string that you put into a char variable is interpreted along with the " ' ". We need to actually key in the hex value. Hmmm...interesting problem. Per my experience, direct feed of Hex values works. Never tried it with variables.
Another question, is this a TROY printer. If so then you should refer to the print command documentation at the following location:
http://www.troygroup.com/support/documents/ProgrammersReferenceGuide.pdf
Hopefully this should help.
2015 Apr 08 12:59 PM
Hi ShanthiPriya,
Based on SAP Help on this issue which states "SAPscript does not interpret the data enclosed by the HEX and ENDHEX command pair, but inserts it unchanged into the output stream. ", thus my conclusion is that the variable is not replaced with its value but is sent to the printer as the variable name itself. Since the printer does not understand the variable name it leaves it, I guess.
Below is the link to SAP Help.
Thus, I guess you will simply have to hardcode the value.
2015 Apr 09 7:54 AM
Hi Ujjval,
Thank you for the response. I replaced the variables with hard-coded values by using IF ELSE Command lines in SAP script. it is working fine now. Thank you
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |