- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: "Printing" reports to PDF file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 05:22 AM
08-21-2008 05:22 AM
The question: How hard is it to create a print queue that will output PDF files rather than paper reports or to get the print stream output to a text file for conversion.
I am currently maintaining an old system (VAX 7000-630 running OpenVMS V7.1 and DECprint Supervisor V2.4, upgrades currently difficult if not impossible) which generate a large number of reports every night on our LP37 line printer. These reports are generated in a number of ways (COM jobs, cobol applications, APTuser/RTS V4.0 report generator).
We can currently redirect these to our HP9050 laser printers and they format correctly ($ SET ENTRY 'P1'/REQUEUE=LASER$PRINT/PARAM=(PAGE_ORIENT=LANDSCAPE)/FORM=LASER2) on the printer (compressed, page numbers, etc). The thought is to redirect them to a different print queue which would instead convert them to PDF files to be distributed and accessed when needed (and also save several trees a month).
My first thought was to simply use TXT2PDF (which I found reference to here, 2001, VMS mods by Craig Berry) to convert the source file but I ran into a problem. The file was truncated to 94 characters, which could be overcome I am sure, but I am not a C programmer and the obvious change (increasing the float page_width = 594.0; line) did not work. Also, since these are wide reports, getting them turned landscape and compressed would allow them to be printed on standard paper when needed, which is when I started thinking about using a print queue and possibly the stream to the printer as input or emulating the HP printer functions.
Any ideas, hints, or previous discussions pointed to would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 05:53 AM
08-21-2008 05:53 AM
Re: "Printing" reports to PDF file
Here, I'd probably not concentrate on PDF itself (as I think that conversion is secondary to the real "fun" here), and would initially look to use the provided MIME utility to send the existing text reports via multipart MIME mail messages, or to register the reports in a database.
EXECSYMB does most of what you need here, and the PDF message conversion or MIME mail message creation or the database operations can be conducted using (mostly) DCL.
Coding a custom print symbiont is easy (in the odd case that EXECSYMB isn't able to do or be extended to do what you need), and it would not surprise me to find a print-to-mail symbiont around. And if there is not such a symbiont around, again, a semi-custom print symbiont is (in the absence of unusual requirements) an easy project for sending mail or writing print files to a database or such.
If you're rolling your own, I've posted code to send mail using documented APIs, and there are other examples of that around.
Stephen Hoffman
HoffmanLabs LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 07:13 AM
08-21-2008 07:13 AM
Re: "Printing" reports to PDF file
I would suggest getting in touch with someone who is familiar with programming in C and PostScript and the related OpenVMS components for queue processing [disclosure: My firm does provide services in this area, as does Hoff's, Hein's, and several other regular contributors).
I recommend caution, and a [careful] review of the relevant print streams.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 12:37 AM
08-22-2008 12:37 AM
SolutionSee http://oswald.knoppers.googlepages.com/mailsymhome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 03:34 AM
08-22-2008 03:34 AM
Re: "Printing" reports to PDF file
Thanks for the pointer to your mailsym. I will be trying it out.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 04:21 AM
08-22-2008 04:21 AM
Re: "Printing" reports to PDF file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2008 11:14 AM
08-23-2008 11:14 AM
Re: "Printing" reports to PDF file
In any case, text2pdf is a very different beast from the txt2pdf referenced in the original query. This one does landscape and has various other features. I've added command-line redirection for VMS (with code lifted from something Martin Vorlaender wrote a long time ago), left and top margin settings via command-line options, and I fixed a bug that caused it to blow up when converting a report in the hundreds of pages. If there is interest, I'll come up with a way of getting this to you, though likely not via the hateful, steaming pile of broken software known as the HP ITRC forums.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2008 03:45 PM
08-23-2008 03:45 PM
Re: "Printing" reports to PDF file
The first one I mentioned earlier is working for landscape (with a small change) but is currently chopping off the first line of every page so if I can get a working version rather than snooping through that one, all the better.
There is also a version of Phil's work inside Oswald's mailsym application. I am working on getting that working now as well but the more choices, the better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2008 11:50 PM
08-23-2008 11:50 PM
Re: "Printing" reports to PDF file
Have you considered submitting your enhanced text2pdf to Hunter Goatley's Fileserv?
That is a better repository than ITRC, and there are mirrors, so it is highly available.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 06:53 AM
08-24-2008 06:53 AM
Re: "Printing" reports to PDF file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 07:15 AM
08-24-2008 07:15 AM
Re: "Printing" reports to PDF file
OK, back to reality. I corresponded with Phil Smith a couple years ago and he was receptive to my changes and indicated he would be putting up a revised version including them on his new web site:
http://www.bagobytes.co.uk/
But there's still nothing there. I will construe his promise to include my changes in the next version as permission to redistribute my revised version, which the copyright in the file otherwise forbids.
I hadn't really thought about other places to distribute this -- it still seems like the best solution would be for the author to maintain it and provide the authoritative source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 09:53 AM
08-24-2008 09:53 AM
Re: "Printing" reports to PDF file
$ text2pdf :== $dka0:[dir]text2pdf.exe
$ text2pdf -"L" -"mt20" -"ml20" -"s9" -"y1008" -"c175" < bigreport.txt > bigreport.pdf
That sets it to landscape with a top margin of 20 points, left margin 20 pixels, 9-point font, vertical page size of 1008 points (72 points per inch times 14 inches for legal size paper [default is letter size]), and lines up to 175 characters long (defaults to 80-character limit).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 12:19 PM
08-24-2008 12:19 PM
Re: "Printing" reports to PDF file
Possibly the word "copyright" in the source?
>frequent "Service unavailable" message
I assume you couldn't do anything if you get these, except switch between forums12 to forums11 and vs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 03:04 PM
08-24-2008 03:04 PM
Re: "Printing" reports to PDF file
And if it is looking at content, it's anyone's guess what content is acceptable content and what's not. I'm certainly not going to illegally omit copyright notices when posting open source software just because the ITRC forum software incorrectly believes that to be a problem but doesn't have the backbone to tell me what it's rejecting and why. Oh, and if there's a good reason for rejecting content, then it should be smart enough to recognize such content inside a zip file.
I did try forums11 and forums12 and a few other names I guessed at. Of course, a working web site does not require me to guess at its internal architecture to work around its bugs. I also tried both standard and secure sessions and different browsers (Safari and Firefox), and I repeated attempts over a three-day period in case there was a traffic problem. None of this made any difference. Of course, numerous HP users over a period of years pointing out the serious defects in the forum software has not made the slightest bit of difference either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 03:09 PM
08-24-2008 03:09 PM
Re: "Printing" reports to PDF file
Perhaps it does, since I can't download the attachment.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 04:47 PM
08-24-2008 04:47 PM
Re: "Printing" reports to PDF file
One question... both versions use the "< input > output" format. Why? I have never seen that format before now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 06:54 PM
08-24-2008 06:54 PM
Re: "Printing" reports to PDF file
The command-line redirection using angle brackets is a unixism that has become ubiquitous -- even DOS has it for goodness' sake. You can get it on VMS v7.0 and later using the PIPE command. But these utilities roll their own so you don't need the PIPE command. This means your I/O is not going through a pipe or a mailbox, which is probably not something you need to care about.
The other unixism is reading from standard input and writing to standard output with no options for specifying the input and output files as parameters. Whatever advantages and disadvantages there are to doing things this way, it's what the utilities did when I found them and I did not seek to change that. It does keep things simple - there is no filename processing, for example.
You can certainly get the same effect by redefining SYS$INPUT and SYS$OUTPUT before running the program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 06:57 PM
08-24-2008 06:57 PM
Re: "Printing" reports to PDF file
Thanks for the tip, I was able to download with firefox. What is odd is that I was able to download a zip file I uploaded using IE7, but not this one.
This worked too, if you have wget on your VMS system.
$ wget --output-document=text2pdf.zip "http://forums.itrc.hp.com/service/forums/getattachment.do?attachmentId=310224&ext=.zip"
Jon
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 07:22 PM
08-24-2008 07:22 PM
Re: "Printing" reports to PDF file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 11:36 PM
08-24-2008 11:36 PM
Re: "Printing" reports to PDF file
contains a corrected version for wide files.
We use 1 script to convert the listings to pdf and mail it to a list of users.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2008 11:48 PM
08-24-2008 11:48 PM
Re: "Printing" reports to PDF file
Note that this requires modification to run on your site (logicals ops&, txt2pdf in my version and BNT stuff replaced, ...).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2008 02:11 AM
08-25-2008 02:11 AM
Re: "Printing" reports to PDF file
My guess about your difficulty uploading (and other's downloading) is that it might be to do with the file TYPE.
Most browsers try to make conclusions about the way to handle specific downloads by their file type.
USUALLY (but without guarantee!) a source file can better be renamed to .TXT, and than renamed back on VMS.
This certainly also applies for .COM files.
hoping to have been of some help,
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2008 03:57 AM
08-25-2008 03:57 AM
Re: "Printing" reports to PDF file
Going to next try Wim's and Craig's solutions to see if I can get either one working... Trick is, I have the next 2 days off before the kids start school on Wednesday, so may not get to try them til them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2008 07:43 AM
08-29-2008 07:43 AM
Re: "Printing" reports to PDF file
I am currently working with Wim's script but just found out mime.exe was released with V7.2. I, of course, am stuck on v7.1 for the forseeable future. I am currently working on this (found a few different possible applications) to see which will work here.
Thank you all once again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2008 08:06 AM
08-29-2008 08:06 AM
Re: "Printing" reports to PDF file
Here's one port:
http://mvb.saic.com/freeware/freewarev50/mpack15/
There may be a newer port around.