Skip to main content

I need to print a pdf file and my report from my COBOL program.  I have made sure I can print from the command line and I put that command in the program and then use c$system.

       PRINT-TRIAL.

           string

               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'

               '\\acrord32.exe"'

               ' \\t '

               '"e:\\source\\68barb\\pmreport.pdf"'

                                       delimited by size

                                 into  command-ln

           end-string.

               

           call "c$system" using command-ln

                         giving exit-status.

The exit-status is 1 after the command executes.

It doesn't seem to print.  is there a way I point to the printer that win$printer is using?

       PRINT-TRIAL.           string               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'               '\\acrord32.exe"'               ' \\t '               '"e:\\source\\68barb\\pmreport.pdf"'                                       delimited by size                                 into  command-ln           end-string.                          call "c$system" using command-ln                         giving exit-status.


#AcuCobolPrinting

I need to print a pdf file and my report from my COBOL program.  I have made sure I can print from the command line and I put that command in the program and then use c$system.

       PRINT-TRIAL.

           string

               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'

               '\\acrord32.exe"'

               ' \\t '

               '"e:\\source\\68barb\\pmreport.pdf"'

                                       delimited by size

                                 into  command-ln

           end-string.

               

           call "c$system" using command-ln

                         giving exit-status.

The exit-status is 1 after the command executes.

It doesn't seem to print.  is there a way I point to the printer that win$printer is using?

       PRINT-TRIAL.           string               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'               '\\acrord32.exe"'               ' \\t '               '"e:\\source\\68barb\\pmreport.pdf"'                                       delimited by size                                 into  command-ln           end-string.                          call "c$system" using command-ln                         giving exit-status.


#AcuCobolPrinting

Your string needs to include the network printer that your sending the print file to. See this forum item: community.microfocus.com/.../2076.printing-how-to-print-a-pdf-directly-without-opening-it.aspx


I need to print a pdf file and my report from my COBOL program.  I have made sure I can print from the command line and I put that command in the program and then use c$system.

       PRINT-TRIAL.

           string

               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'

               '\\acrord32.exe"'

               ' \\t '

               '"e:\\source\\68barb\\pmreport.pdf"'

                                       delimited by size

                                 into  command-ln

           end-string.

               

           call "c$system" using command-ln

                         giving exit-status.

The exit-status is 1 after the command executes.

It doesn't seem to print.  is there a way I point to the printer that win$printer is using?

       PRINT-TRIAL.           string               '"c:program files (x86)\\Adobe\\Reader 11.0\\reader'               '\\acrord32.exe"'               ' \\t '               '"e:\\source\\68barb\\pmreport.pdf"'                                       delimited by size                                 into  command-ln           end-string.                          call "c$system" using command-ln                         giving exit-status.


#AcuCobolPrinting

I had looked at this before posting the question.  It would be nice to show AcroRd32.exe /t "C:\\test.pdf" "Our Printer" as an example.  The question has been answered.