Hello,
I have a printing program that creates a PDF file and opens it directly when the program is executed.
But when I want to execute the program using a button in Profound, when I run in Atrium, the PDF file is created but it does not open automatically.
Why the PDF file can not open with Profound?
Open PDF in atrium
-
- Profound User
- Posts: 37
- Joined: Tue Aug 27, 2013 7:34 am
- First Name: Seynabou
- Last Name: Gueye
- Company Name: Oo2
- Country: Senegal
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Open PDF in atrium
What do you mean when you say that it "opens it directly when the program is executed"?
What sort of program is this? What mechanism does it use to open the file? Can you provide some details?
What sort of program is this? What mechanism does it use to open the file? Can you provide some details?
-
- Profound User
- Posts: 37
- Joined: Tue Aug 27, 2013 7:34 am
- First Name: Seynabou
- Last Name: Gueye
- Company Name: Oo2
- Country: Senegal
- Contact:
Re: Open PDF in atrium
This is an RPG program that I use. Here is the pinciple:
1) First I create a PRTF file naming RECEPISEPR.
2) Then I declare the PRTF file in a program naming RECEPISEP that receives a parameter. In this program I use the STRPCO, STRPCCMD and Start commands to open the PDF file.
Now when I run the program RECEPISEP directly on SEU by making a call (for example: call RECEPISEP parm('12345678'), the PDF that has the number 12345678 opens.
But in Profound when I defined a button and in the program I test if the button is active I call the program RECEPISEP, the PDF file doesn't open.
1) First I create a PRTF file naming RECEPISEPR.
2) Then I declare the PRTF file in a program naming RECEPISEP that receives a parameter. In this program I use the STRPCO, STRPCCMD and Start commands to open the PDF file.
Now when I run the program RECEPISEP directly on SEU by making a call (for example: call RECEPISEP parm('12345678'), the PDF that has the number 12345678 opens.
But in Profound when I defined a button and in the program I test if the button is active I call the program RECEPISEP, the PDF file doesn't open.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Open PDF in atrium
So, if I understand you correctly, you are:
1) Generating a print file (PRTF) from the RPG program.
2) Somehow (you didn't explain) converting this to a PDF in the IFS
3) Have a drive letter (or similar) mapped to the IFS.
4) Using STRPCO/STRPCCMD to open the PDF on the user's PC.
Now your goal is to change this to open the PDF from Atrium, somehow.
If your PDF file is already in the IFS (i.e., you don't need to run a program to generate it) then you could make sure the PDF is available in the Document Root (or an Alias) of your HTTP server instance, then add a "web application" menu item in Atrium that points a URL directly to the PDF. This would cause it to open directly from Atrium.
But, I suspect that you really want to run an RPG program (not just open the PDF from Atrium). In this case, you'll either need to have a program using a Profound UI Rich Display, or a Genie program that you run from Atrium.
From Genie, your program should work exactly as you have it now. It would use STRPCO/STRPCCMD to launch the PDF file. You just need to create a Genie Macro to navigate the user (once he/she has signed on) to the proper place to run your existing program and it should work immediately.
From a Rich Display, you can generate the PDF as you are already doing, and then use the runPCCommand() API from the onload event of your screen to open the PDF. This would work exactly like the existing application... it runs a command on the PC, which in turn will launch the PDF via the mapped drive.
Or, even better, you could eliminate the mapped drive and the need for the PC Command Java applet by using the pui.download() API. This would let you use the HTTP protocol (like you are already using for the screens) to open the PDF file. You could say that it should be inline, in which case it'll open immediately on the user's screen, or if not inline, the user will have the option to save it to disk or launch it in a program like Adobe Reader. This is the most robust and versatile method.
Does that help?
1) Generating a print file (PRTF) from the RPG program.
2) Somehow (you didn't explain) converting this to a PDF in the IFS
3) Have a drive letter (or similar) mapped to the IFS.
4) Using STRPCO/STRPCCMD to open the PDF on the user's PC.
Now your goal is to change this to open the PDF from Atrium, somehow.
If your PDF file is already in the IFS (i.e., you don't need to run a program to generate it) then you could make sure the PDF is available in the Document Root (or an Alias) of your HTTP server instance, then add a "web application" menu item in Atrium that points a URL directly to the PDF. This would cause it to open directly from Atrium.
But, I suspect that you really want to run an RPG program (not just open the PDF from Atrium). In this case, you'll either need to have a program using a Profound UI Rich Display, or a Genie program that you run from Atrium.
From Genie, your program should work exactly as you have it now. It would use STRPCO/STRPCCMD to launch the PDF file. You just need to create a Genie Macro to navigate the user (once he/she has signed on) to the proper place to run your existing program and it should work immediately.
From a Rich Display, you can generate the PDF as you are already doing, and then use the runPCCommand() API from the onload event of your screen to open the PDF. This would work exactly like the existing application... it runs a command on the PC, which in turn will launch the PDF via the mapped drive.
Or, even better, you could eliminate the mapped drive and the need for the PC Command Java applet by using the pui.download() API. This would let you use the HTTP protocol (like you are already using for the screens) to open the PDF file. You could say that it should be inline, in which case it'll open immediately on the user's screen, or if not inline, the user will have the option to save it to disk or launch it in a program like Adobe Reader. This is the most robust and versatile method.
Does that help?
Who is online
Users browsing this forum: No registered users and 7 guests