Operating System - OpenVMS
1753705 Members
4869 Online
108799 Solutions
New Discussion юеВ

Re: "Printing" reports to PDF file

 
SOLVED
Go to solution
Craig A Berry
Honored Contributor

Re: "Printing" reports to PDF file

A miracle! All I had to do was zip the little 18K source file and the forum software accepted it. Wish I"d thought of that days ago. I also wish I knew what exactly it was about a very modest-sized .c file that it doesn't like. And while I'm wishing, what if it actually TOLD me my attachment didn't comply with some guideline or other and helpfully directed me to where those guidelines are posted rather than disappearing into the ether and giving me a completely blank page or the dreaded but frequent "Service unavailable" message?

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.
Craig A Berry
Honored Contributor

Re: "Printing" reports to PDF file

And just as an example of how to use it:

$ 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).
Dennis Handly
Acclaimed Contributor

Re: "Printing" reports to PDF file

>Craig: what if it actually TOLD me my attachment didn't comply with some guideline

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.
Craig A Berry
Honored Contributor

Re: "Printing" reports to PDF file

Dennis, heck if I know whether it's looking at content, file extension, miscalculating file size and thinking it's too big when it's not, or any number of other rejection criteria that are, as far as I can find, completely opaque to the users of the site, undocumented in site policies, and unreported by the software generating the error conditions.

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.
Jon Pinkley
Honored Contributor

Re: "Printing" reports to PDF file

RE:"if there's a good reason for rejecting content, then it should be smart enough to recognize such content inside a zip file."

Perhaps it does, since I can't download the attachment.

Jon
it depends

Re: "Printing" reports to PDF file

I could not download using IE7 either but once I used FireFox and told it to download rather than open in IE (don't know why it would try that) I was able to save it and access it.

One question... both versions use the "< input > output" format. Why? I have never seen that format before now.
Craig A Berry
Honored Contributor

Re: "Printing" reports to PDF file

Steven,

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.
Jon Pinkley
Honored Contributor

Re: "Printing" reports to PDF file

Steven,

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
it depends
Craig A Berry
Honored Contributor

Re: "Printing" reports to PDF file

I've put it up here too if that's easier for anybody:

http://eisner.decus.org/~berry_c/text2pdf.zip
Wim Van den Wyngaert
Honored Contributor

Re: "Printing" reports to PDF file

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1053459
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
Wim