Need to display a PDF on i5

35 pts.
Tags:
i5
iSeries printing
OVRPRTF
PDF
I need to display a PDF file that was created using OVRPRTF with WSCST(*PDF) on the user's i5 screen. I have tried IFS command DSPF but only garbage displays. This program used to do a DSPSPLF but we had to change it to use an overlay and only the data shows (none of the text of the overlay) when you do DSPSPLF. Is there a solution? Thanks!

Answer Wiki

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

Assuming that you stored the .pdf file on the IFS (using OVRPRTF parameter TOSTMF),
this is how I have solved a similar task:

First of all make sure that PCO is active. Use STRPCO and MONMSG(IWS4010).

Then build a variable containing path and filename of the .pdf. Fx CGHVAR &STRING to ‘d:/[mypath]/[mydocname].pdf’ .

Assign a drive-letter to your path: NET USE [d]: \\[myi5]\[mypath] [mypassword]

Now run the STRPCCMD PCCMD(&string) PAUSE(*NO) and your .pdf file will be opened and displayed.

DanF

Discuss This Question: 6  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
  • slack400
    I'm fairly certain you can't display a PDF view from a green screen. The best you can do is what Dan has outlined and open the PDF from a desktop computer running an PDF viewer program. The i isn't a system built to provide a desktop-like gui for users.
    2,705 pointsBadges:
    report
  • TomLiotta
    You need to install a .PDF Reader function that interprets .PDF content into text and outputs to a terminal device. If you can find one that works from a Linux or UNIX command line (not in a GUI), you might be able to run it in PASE. I don't think I've ever heard of any. Keep in mind that .PDFs are Adobe objects. Technically, it would be Adobe's task to supply readers if they chose to do so. But they also publish specs that allow developers to create their own readers as well as to generate .PDFs themselves. I'd suspect that the demand for command line viewing of .PDFs in Windows, Linux/UNIX, AS/400 or any other platform, is close to zero. Anything that displays through a command window is almost always a text object anyway, which .PDFs are not. (True, they may only contain instructions for printing text; but that's not apparent except by reading and interpreting the content.) Best bet is probably searches for Linux or AIX utilities if green-screen is required. Otherwise, DanTheDane's answer is about as close as you'll get. Tom
    125,585 pointsBadges:
    report
  • HappyLackey
    Thanks all! I was able to display it basically using Dan's code. I was not able to get it to work without specifying a drive, and unfortuantely the drive may not be consistent for all users. But specifying my drive worked fine. Almost all the time. Intermittently I get an Adobe error that says it can't find the file. I put it in debug to try to find the reason and of course it works great all the time. Now when I call the program without being in debug it gets the file not found msg. Thanks!
    35 pointsBadges:
    report
  • TomLiotta
    I was able to display it basically using Dan’s code. The drive mapping may be different for different users and different PCs. The Windows networking may connect differently for PCs in different domains/workgroups/whatever, and the user/password that is attempting the connection may change. Also, the specific emulator may interpret a STRPCCMD request differently. The degree to which the TN5250 protocol is implemented and the specifics of that implementation can vary. (Example result can be seen by trying STRPCCMD in a simple Windows telnet connection.) Obviously, any direct terminal won't work either. But STRPCCMD is often the only choice. Drive mapping is mostly a separate issue that should first be worked out straight through a Windows command line. Once you know how to make it work there, you'll know more about how to use it inside of STRPCCMD. Tom
    125,585 pointsBadges:
    report
  • HappyLackey
    [...] Need to display a PDF on i5 [...]
    0 pointsBadges:
    report
  • Stiloabarthian
    You don't need to map a drive - I ran it successfully using the unc name.
    175 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