Triggering the print of a PDF from the AS400

80 pts.
Tags:
IFS Commands
IFS objects
I need to print a PDF file, to a pre-defined outq, triggered from the AS400. In this case, when a barcode is scanned on the AS400. The outq is static, and the name of the PDF file is static. I am thinking that I can store the PDF in the IFS? not sure, I am looking for information on how to do this a simple way. Particularly the code to get the PDF file sent. maybe using SQL? Please help

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you are on V6R1, this may help you:

http://systeminetwork.com/article/generate-pdf-files-using-only-i-61-0

Good luck.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    What do you mean by "print a PDF file"? Does it mean that a .PDF exists and you want to print it? Or does it mean you want to generate a .PDF? If it's going to be a .PDF, why should you print it? Its value to you should be that it doesn't need to be printed. It can be manipulated as a straight streamfile and simply stored for later use by some other application, probably on a different system. If printing is the actual objective, what does ".PDF" bring to the problem? Why not just generate common spooled printer output? The business problem behind the question needs to be clarified. Answers will change depending on what is actually needed. Details such as version of the OS and any languages that you might be able to use will be very helpful. Tom
    125,585 pointsBadges:
    report
  • Dobie
    The request is to print a PDF file upon a scan of a barcode at our End of Line Manufacturing Operations. The PDF is work instructions document, which will be updated periodically by somebody and stored as a PDF file. They want me to control the printing, so that each manufactured assembly, gets a work instruction sheet printed when it is completed. They want me to pull in the PDF for printing, in case there are updates made to the work instructions, the most recent version is always printed. We are on V5R4. Working with RPG IV, not full blown ILE. Also embedded SQL.
    80 pointsBadges:
    report
  • DanTheDane
    Dobie, Unfortunately your description is somewhat unclear to me. Therefor I'll try to clarify my interpretation of it: When a barcode is scanned, a pre-prepared sheet (PDF-format) shall be grabbed and printed automatically. In other words, the PDF-sheet is selected from a library of prepared PDF-sheets. Selection is based on a key being entered as a read-of-a-barcode. My interpretation of your question, is now reduced to " How can I initiate the printing of a specific .PDF file from RPG or CL ?" If you are still with me, and my interpretation responds to your request, here are some ideas which you may use. Run a 'start-adobe' command from a CL-pgm (use STRPCCMD):
    PGM 
    STRPCO
    MONMSG     MSGID(CPF0000)
    STRPCCMD   PCCMD('"C:ProgrammerAdobeReader +
                 9.0ReaderAcroRd32.exe" /p "C:test.pdf"')
    ENDPGM
    
    Some links which may be helpfull. I know this is not the optimum solution, but it works for me :-) DanF
    2,555 pointsBadges:
    report
  • DanTheDane
    Ouuupps!! - here are the links: http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf#page=27 http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#page=5 http://two.pairlist.net/pipermail/reportlab-users/2003-January/001158.html
    2,555 pointsBadges:
    report
  • TomLiotta
    An easier command might be:
    STRPCCMD   PCCMD(’start AcroRd32.exe /t C:test.pdf‘)
    If printing may be left up to the user, then this would be better:
    STRPCCMD   PCCMD(’start C:test.pdf‘)
    In the first case, it is assumed that AcroRd32.exe is installed on the PC. In the second case, any .PDF utility that is registered to handle .PDF files will be called. Unfortunately, the second form is more difficult to get to recognize command-line parameters for the target program. In both cases, STRPCCMD PAUSE(*NO) is reasonable. Additional parameters for the Windows START command itself might be wanted. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following