Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
cobolbarbie Absent Member.
Absent Member.
1562 views

printing a pdf file

Jump to solution

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.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
cobolbarbie Absent Member.
Absent Member.

RE: printing a pdf file

Jump to solution

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.

View solution in original post

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: printing a pdf file

Jump to solution

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

0 Likes
cobolbarbie Absent Member.
Absent Member.

RE: printing a pdf file

Jump to solution

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.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.