Skip to main content

Hi,  in RM/COBOL 12xx is possible generate a file pdf ?  I'll explain : I've a program that print on a printer a bill. If I need to trasform or redirect the printout created  on a file .pdf how can do it ?

 Thanks everyone for the help.....................

Hi,  in RM/COBOL 12xx is possible generate a file pdf ?  I'll explain : I've a program that print on a printer a bill. If I need to trasform or redirect the printout created  on a file .pdf how can do it ?

 Thanks everyone for the help.....................

Hi

Have you looked at "pandoc"

This is very powerful and can create pdf files.

see

https://pandoc.org/demos.html

scroll down and see pdf examples.

<>>

 

  • From markdown to PDF:

    pandoc MANUAL.txt --pdf-engine=xelatex -o example13.pdf
  • PDF with numbered sections and a custom LaTeX header:

    pandoc -N --template=template.tex --variable mainfont="Palatino" --variable sansfont="Helvetica" --variable monofont="Menlo" --variable fontsize=12pt --variable version=2.0 MANUAL.txt --pdf-engine=xelatex --toc -o example14.pdf

 

<>>>

 


Hi,  in RM/COBOL 12xx is possible generate a file pdf ?  I'll explain : I've a program that print on a printer a bill. If I need to trasform or redirect the printout created  on a file .pdf how can do it ?

 Thanks everyone for the help.....................

Windows, Linux, or both?


Windows, Linux, or both?

Windows 10  ..................


Hi

Have you looked at "pandoc"

This is very powerful and can create pdf files.

see

https://pandoc.org/demos.html

scroll down and see pdf examples.

<>>

 

  • From markdown to PDF:

    pandoc MANUAL.txt --pdf-engine=xelatex -o example13.pdf
  • PDF with numbered sections and a custom LaTeX header:

    pandoc -N --template=template.tex --variable mainfont="Palatino" --variable sansfont="Helvetica" --variable monofont="Menlo" --variable fontsize=12pt --variable version=2.0 MANUAL.txt --pdf-engine=xelatex --toc -o example14.pdf

 

<>>>

 

Hi, I tried to use pandoc in demo but I hope I don't' understand the use. The question is: If I open my and print as in the example below, how can print with PANDOC ????

Excuse me but I'm a little inexperienced.................   many thanks

SELECT STAMPA ASSIGN TO PRINT MODULO
FILE STATUS IS STAMPA-STATUS.

..................................

FD STAMPA LABEL RECORD OMITTED.
01 STREC PIC X(232).

...............................

77 MODULO PIC X(9) VALUE "PRINTER?".

..........................

OPEN OUTPUT STAMPA.

................


call "P$DrawBitmap" using "LOGODIT.bmp"
, 00,0 00,5 "A" "M" 06,3 02,1 "M".

etc............


Windows 10  ..................

I chose the "Windows Print to PDF" to run the pdraw.cbl sample program. It worked.

I chose the "Windows Print to PDF" to run the pdraw.cbl sample program. It worked.

Yes. In my case I use pdf995

Regards,

 


I chose the "Windows Print to PDF" to run the pdraw.cbl sample program. It worked.

Thank you very much for the help. I tried the utility and works fine but I have another big doubt. Once I generate the pdf file, how can I send the generated file via e-mail ? I have the address in my cobol database but I don't know the way to do this. Expect I too much ???   thanks for your patience...............


Thank you very much for the help. I tried the utility and works fine but I have another big doubt. Once I generate the pdf file, how can I send the generated file via e-mail ? I have the address in my cobol database but I don't know the way to do this. Expect I too much ???   thanks for your patience...............

Hi,

You can use Mailsend (mailsend.exe) via a call "system" like this:

MOVE "youremail@gmail.com" TO MAIL-OFLONDON
MOVE "yourpassword" TO LAPASSWORD
move spaces to reg1.
move 512 to largo
move spaces to lineaemail.
move "email that sends" to li-mail.
String 'C:\\windows\\system32\\cmd /c MailSend -f '
DELIMITED BY SIZE
MAIL-OFLONDON delimited by " "
' -starttls -d -auth-login' delimited by size
' -port 587' delimited by size
' -smtp smtp.gmail.com -t '
delimited by size
LI-mail delimited by " "
' -user ' DELIMITED BY SIZE
MAIL-oflondon DELIMITED BY " "
' -pass ' DELIMITED BY SIZE
lapassword delimited by " "
' -sub "Subject for your email"'
delimited by size
' -attach "body.txt,text/plain,i"'
delimited by size
' -attach "attachment.pdf"'
delimited by size
into reg1
end-string.
MOVE 0 TO LARGO.
INSPECT reg1 TALLYING LARGO FOR
CHARACTERS BEFORE INITIAL " ".
move reg1 to lineaemail.

Call "System" using lineaemail.

You can download Mailsend here: https://github.com/muquit/mailsend/releases/tag/1.19

Regards,

 


Hi,

You can use Mailsend (mailsend.exe) via a call "system" like this:

MOVE "youremail@gmail.com" TO MAIL-OFLONDON
MOVE "yourpassword" TO LAPASSWORD
move spaces to reg1.
move 512 to largo
move spaces to lineaemail.
move "email that sends" to li-mail.
String 'C:\\windows\\system32\\cmd /c MailSend -f '
DELIMITED BY SIZE
MAIL-OFLONDON delimited by " "
' -starttls -d -auth-login' delimited by size
' -port 587' delimited by size
' -smtp smtp.gmail.com -t '
delimited by size
LI-mail delimited by " "
' -user ' DELIMITED BY SIZE
MAIL-oflondon DELIMITED BY " "
' -pass ' DELIMITED BY SIZE
lapassword delimited by " "
' -sub "Subject for your email"'
delimited by size
' -attach "body.txt,text/plain,i"'
delimited by size
' -attach "attachment.pdf"'
delimited by size
into reg1
end-string.
MOVE 0 TO LARGO.
INSPECT reg1 TALLYING LARGO FOR
CHARACTERS BEFORE INITIAL " ".
move reg1 to lineaemail.

Call "System" using lineaemail.

You can download Mailsend here: https://github.com/muquit/mailsend/releases/tag/1.19

Regards,

 

A great idea !    I'll try and I'll let you know.............. I hope to succeed


Hi,  in RM/COBOL 12xx is possible generate a file pdf ?  I'll explain : I've a program that print on a printer a bill. If I need to trasform or redirect the printout created  on a file .pdf how can do it ?

 Thanks everyone for the help.....................

Hello. My experience is using a PDF printer. With a PDF printer you can use the "PRINTER?" and you just have to select the PDF printer and the file name. I recommend Bullzip PDF is free. https://www.bullzip.com/products/pdf/download.php


Hello. My experience is using a PDF printer. With a PDF printer you can use the "PRINTER?" and you just have to select the PDF printer and the file name. I recommend Bullzip PDF is free. https://www.bullzip.com/products/pdf/download.php

Many thanks for the suggestion. But now I have another dubt.  My program generates the file pdf and it's ok.  I will have to create a program that prints a bill in pdf and send it by e-mail ( I have the destination address in my archive cobol with the other information of the customer ). How can I print and sent it ???  ( many times the pdf to send are more than one ....... )   These last two nights I worked hard but I had no results....................

Many thanks to all you !!!!!


Many thanks for the suggestion. But now I have another dubt.  My program generates the file pdf and it's ok.  I will have to create a program that prints a bill in pdf and send it by e-mail ( I have the destination address in my archive cobol with the other information of the customer ). How can I print and sent it ???  ( many times the pdf to send are more than one ....... )   These last two nights I worked hard but I had no results....................

Many thanks to all you !!!!!

Hi,

I assume you can generate the PDF file and also send it by email, buy you want to automate the PDF generation without entering a file name each time you run, rihgt?

Please take a look for Microsoft Print to PDF. The same type of configuration will work for other king of PDF printers like pdf995

https://docs.microsoft.com/es-ES/troubleshoot/windows-server/printing/print-to-file-without-user-intervention

Regards,