I need to print logo as part of an invoice. How can I do that.
I need to print logo as part of an invoice. How can I do that.
First, save the logo into a file (such as "MYLOGO")
SL:
SELECT LOGO ASSIGN TO INPUT LOGOFILE
ORGANIZATION IS BINARY SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
SELECT PRTFILE ASSIGN TO PRINT "PRINTER"
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.
FD:
FD LOGO LABEL RECORDS ARE OMITTED
RECORD CONTAINS 65000 CHARACTERS
DATA RECORD IS LOGO-RECORD.
01 LOGO-RECORD.
02 LOGO-TEXT PIC X(65000).
FD PRTFILE LABEL RECORDS STANDARD.
01 PRINT-REC PIC X(65000).
Working-Storage:
01 LOGOFILE PIC X(9) VALUE SPACES.
01 PRINT-CODES-LINE.
02 PRINTER-CODE PIC X OCCURS 132 TIMES.
Procedure Division:
OPEN OUTPUT PRTFILE WITH NO REWIND
MOVE SPACES TO PRINT-CODES-LINE
{populate the print record with the codes to reset the printer such as "escape" and "E"}
WRITE PRINT-REC FROM PRINT-CODES-LINE BEFORE 0
MOVE "MYLOGO" TO LOGOFILE
OPEN INPUT LOGO
READ LOGO
WRITE PRINT-REC FROM LOGO-TEXT AFTER 0
CLOSE LOGO
CLOSE PRTFILE.
Of course somewhere in there you will be printing the invoice, but this is how we handle the logos. Maybe not the most efficient way, but it's a way.
Hope this helps.
Thanks.
Russell
I need to print logo as part of an invoice. How can I do that.
First, save the logo into a file (such as "MYLOGO")
SL:
SELECT LOGO ASSIGN TO INPUT LOGOFILE
ORGANIZATION IS BINARY SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
SELECT PRTFILE ASSIGN TO PRINT "PRINTER"
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.
FD:
FD LOGO LABEL RECORDS ARE OMITTED
RECORD CONTAINS 65000 CHARACTERS
DATA RECORD IS LOGO-RECORD.
01 LOGO-RECORD.
02 LOGO-TEXT PIC X(65000).
FD PRTFILE LABEL RECORDS STANDARD.
01 PRINT-REC PIC X(65000).
Working-Storage:
01 LOGOFILE PIC X(9) VALUE SPACES.
01 PRINT-CODES-LINE.
02 PRINTER-CODE PIC X OCCURS 132 TIMES.
Procedure Division:
OPEN OUTPUT PRTFILE WITH NO REWIND
MOVE SPACES TO PRINT-CODES-LINE
{populate the print record with the codes to reset the printer such as "escape" and "E"}
WRITE PRINT-REC FROM PRINT-CODES-LINE BEFORE 0
MOVE "MYLOGO" TO LOGOFILE
OPEN INPUT LOGO
READ LOGO
WRITE PRINT-REC FROM LOGO-TEXT AFTER 0
CLOSE LOGO
CLOSE PRTFILE.
Of course somewhere in there you will be printing the invoice, but this is how we handle the logos. Maybe not the most efficient way, but it's a way.
Hope this helps.
Thanks.
Russell
I need to print logo as part of an invoice. How can I do that.
I need to print logo as part of an invoice. How can I do that.
I'm testing your program, but have trouble with printing (laser). No logo, only hex-codes.
What do I need to do?
Kjell Erik
I need to print logo as part of an invoice. How can I do that.
Are you printing from a Windows environment or Unix/Linux environment?
If Windows, are the Runtime Configuration entries:
(a) "Printer Enable Esc. Seqs = True"
(b) "Printer Enable Null Esc Seq = False"
(c) "Printer Enable Raw Mode = "True"?
I need to print logo as part of an invoice. How can I do that.
Are you printing from a Windows environment or Unix/Linux environment?
If Windows, are the Runtime Configuration entries:
(a) "Printer Enable Esc. Seqs = True"
(b) "Printer Enable Null Esc Seq = False"
(c) "Printer Enable Raw Mode = "True"?
I need to print logo as part of an invoice. How can I do that.
I send esc seqs to printer (font) in the same program, and that's ok.
I need to print logo as part of an invoice. How can I do that.
My suggestion...
copy your logo file to filename "MYLOGO"
compile the source code program to make sure it compiles ok
run the program.
It will be interesting to see if this works or not. Let me know the results, please.
ID DIVISION.
PROGRAM-ID. PRTLOGO.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
*
>> imp margin-r end
*
FILE-CONTROL.
*
logo SELECT LOGO ASSIGN TO INPUT LOGOFILE
ORGANIZATION IS BINARY SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
*
SELECT PRTFILE ASSIGN TO PRINT "PRINTER"
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.
*
*
DATA DIVISION.
FILE SECTION.
*
logo FD LOGO LABEL RECORDS ARE OMITTED
RECORD CONTAINS 65000 CHARACTERS
DATA RECORD IS LOGO-RECORD.
01 LOGO-RECORD.
02 LOGO-TEXT PIC X(65000).
*
FD PRTFILE LABEL RECORDS STANDARD.
01 PRINT-REC PIC X(65000).
*
WORKING-STORAGE SECTION.
01 P-RELEASE PIC X(06) VALUE "v1.0.0".
01 SYS-DATE.
02 SYS-YR PIC 9(4).
02 SYS-MO PIC 99.
02 SYS-DA PIC 99.
01 D-DATE.
02 D-MO PIC 99.
02 FILLER PIC X VALUE "/".
02 D-DA PIC 99.
02 FILLER PIC X VALUE "/".
02 D-YR PIC 9999.
01 WK-SPACING-PRINT-1.
02 WK-SPACING-ESC-1 PIC 999 COMP-1 VALUE 27.
*
01 WK-CHAR-ESC REDEFINES WK-SPACING-PRINT-1.
02 FILLER PIC X.
02 WK-ESC-FIELD PIC X.
*
01 PRINT-CODES-LINE.
02 PRINTER-CODE PIC X OCCURS 132 TIMES.
logo 01 LOGOFILE PIC X(9) VALUE SPACES.
01 P-RESET-PTR-CODE PIC X(2) VALUE "E".
PROCEDURE DIVISION.
MAIN SECTION.
MAIN-RTN.
INITIALIZE SYS-DATE
ACCEPT SYS-DATE FROM CENTURY-DATE
DISPLAY SPACES LINE 1 COL 01 ERASE
MOVE SYS-MO TO D-MO
MOVE SYS-DA TO D-DA
MOVE SYS-YR TO D-YR
DISPLAY D-DATE LINE 01 COL 01
DISPLAY P-RELEASE LINE 01 COL 75
DISPLAY "Print Logo" LINE 02 COL 30
DISPLAY ALL "=" LINE 03 COL 01 SIZE 80 REVERSE
OPEN OUTPUT PRTFILE WITH NO REWIND
* reset printer
MOVE SPACES TO PRINT-CODES-LINE
MOVE "~E~&l6D" TO PRINT-CODES-LINE
INSPECT PRINT-CODES-LINE REPLACING ALL "~" BY WK-ESC-FIELD
WRITE PRINT-REC FROM PRINT-CODES-LINE BEFORE 0
MOVE "MYLOGO" TO LOGOFILE
OPEN INPUT LOGO
READ LOGO
WRITE PRINT-REC FROM LOGO-TEXT AFTER 0
CLOSE LOGO
MOVE SPACES TO PRINT-CODES-LINE
pcl *****Set PCL code: Print 16 lpi
MOVE "~(s10H~&l6D" TO PRINT-CODES-LINE
INSPECT PRINT-CODES-LINE REPLACING ALL "~" BY WK-ESC-FIELD
WRITE PRINT-REC FROM PRINT-CODES-LINE AFTER 0
MOVE SPACES TO PRINT-CODES-LINE
MOVE "~*p0x425Y~(s10h0s0B" TO PRINT-CODES-LINE
INSPECT PRINT-CODES-LINE REPLACING ALL "~" BY WK-ESC-FIELD
WRITE PRINT-REC FROM PRINT-CODES-LINE AFTER 0
* Print Cust Name & Addr
MOVE SPACES TO PRINT-CODES-LINE
MOVE "~(s10H~*p100x537Y" TO PRINT-CODES-LINE
INSPECT PRINT-CODES-LINE REPLACING ALL "~" BY WK-ESC-FIELD
WRITE PRINT-REC FROM PRINT-CODES-LINE
* Print Cust Line 1
MOVE SPACES TO PRINT-REC
MOVE "My Company Name" TO PRINT-REC
WRITE PRINT-REC
MOVE SPACES TO PRINT-REC
MOVE "My Company Address" TO PRINT-REC
WRITE PRINT-REC
WRITE PRINT-REC FROM P-RESET-PTR-CODE AFTER 0
CLOSE PRTFILE.
*
END-PROGRAM.
GOBACK.
I need to print logo as part of an invoice. How can I do that.
For me it didn't work.
Reading logo-file, and 'write print-rec from print-code-line' , the printer pull out pages with control codes.
I use an old compiler running sco-unix.
Kjell Erik
I need to print logo as part of an invoice. How can I do that.
For me it didn't work.
Reading logo-file, and 'write print-rec from print-code-line' , the printer pull out pages with control codes.
I use an old compiler running sco-unix.
Kjell Erik
I need to print logo as part of an invoice. How can I do that.
I need to print logo as part of an invoice. How can I do that.
I need to print logo as part of an invoice. How can I do that.
You stated: "the printer pull out pages with control codes":
#1 Does the printer use PCL6? Not 5 or 5e, it must be PCL 6.
There were 2 text lines in the example program:
My Company Name
My Company Address
#2 Did those 2 lines print?
I'm beginning to suspect I have mislead you regarding storing the logo as a file. Give me a couple of hours to review my notes regarding logos. I apologize for the issues. I will get back with you soon.
I need to print logo as part of an invoice. How can I do that.
You stated: "the printer pull out pages with control codes":
#1 Does the printer use PCL6? Not 5 or 5e, it must be PCL 6.
There were 2 text lines in the example program:
My Company Name
My Company Address
#2 Did those 2 lines print?
I'm beginning to suspect I have mislead you regarding storing the logo as a file. Give me a couple of hours to review my notes regarding logos. I apologize for the issues. I will get back with you soon.
I need to print logo as part of an invoice. How can I do that.
#2 yes
I need to print logo as part of an invoice. How can I do that.
Would you be willing to email your logo to me? If so, I will do some testing to see if I can get it working within the "hack" program. Then, I could send you the result and ask you to test it. Just let me know at your convenience, please. Thanks!
I need to print logo as part of an invoice. How can I do that.
I need to print logo as part of an invoice. How can I do that.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.