As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
I need to auto print the pdf files depending upon the selection on the html file .Once the parameters are entered in the html,the fex file get executed and the pdf files are generated. Our current situation is the user needs to open the pdf manually and get it printed.
But the user needs to auto print the pdf files without manually opening it.I have tried the following options to do this:
The following is an example of the code:
-FILEDEF TEST1 DISK C:\WORK\TEST1.PDF -RUN
SET PRINTPLUS=ON SET STYLEMODE=PAGED
TABLE FILE CAR PRINT MODEL BODYTYPE SEATS BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE HOLD AS TEST1 FORMAT WP END RUN
I have tried the following:
DOS PRINT /D:\\Device C:\WORK\TEST1.PDF also I have tried using DOS COPY .when I executed the fex I’m getting the error message as 0 number of records in table. It’s possible for me to manually open the pdf and see the content but it’s not possible to auto print it. I have tried the PS Format too but I got the error message as 0 PS file saved. Any suggestion for this issue is highly appreciated. I’m using Web focus Developer Studio version: 7.1.7
Not to be a do-gooder or get on a soap box of any kind, why would a user want to do this? It could potentially be an awful waste of paper/trees.
Good luck, Carol
Posts: 36 | Location: Rolling Meadows, IL | Registered: September 05, 2007
when you're using PCHOLD. When you're using HOLD, the file is created in the designated location on the server and the program continues, so, you should theoretically be able to automatically print the PDF file. Dn't forget that this is happening on the server, so the printer must be addressable by the server.
Your example shows FILEDEF is PDF, but the format is WP - it should be PDF.
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
PDF and Postscript(PS) are their own "languages" (sorry couldn't think of a better term). If you open a PDF document in a text editor, you can see that it contains more than just what you see on the report. If it contains images, embedded fonts, lines, etc., those are all written into the document. So naming the file with a .PDF and holding format WP is like calling an elephant a duck. You can call it whatever you want but it's still an elephant. That being said, here's a couple suggestions. As mentioned, if you want the output to be sent directly to a printer, hold format PS, then use a system command like lineprint to print it natively(lpr -S printer IP -P printer queue/DEFAULT filename). You could also set up FEX that could be scheduled dynamically in ReportCaster and use RC's printer distribution functionality. Note that both of these require that the printer must be postscript-capable. More and more business-class printers these days come with the functionality built in, but many require an additional module or do not have this functionality at all. Last, most printers, by theirselves, do not understand what a PDF document is. If you use a DOS print command, you just get a bunch of text. It must be manually opened and printed from an application like Adobe Reader. However, many printers now have multiple queue functionality and are smart enough to pick up a document in a specified queue and handle it differently than other queues. This gives it the ability to pick up a document sent to a "PDF" queue render its image in a PDf document, and then print it. We're probably talking $$$ here if you don't currently have that functionality.
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007