## Forum archive 2000-2006

### Michael Gage - error in getting hard copy in PDF format (reposting)

by Arnold Pizer -
Number of replies: 0
 error in getting hard copy in PDF format (reposting) topic started 3/7/2002; 8:39:51 PMlast post 3/7/2002; 8:43:50 PM
 Michael Gage - error in getting hard copy in PDF format (reposting)  3/7/2002; 8:39:51 PM (reads: 930, responses: 1) This is a reposting a message that was inadvertently lost in the webserver change over. -- Mike By: cmett@radford.edu Coreen Mett Has anybody else experienced this problem? I've searched through the discussion group and found no mention of it. I'm still using V1.6 of WeBWorK. The server is refusing to deliver a PDF hard copy in ALL WeBWorK courses? Enclosed below are 3 clues:1) feedback from the request for hard copy in pdf format.2) corresoponding message in error_log3) subroutine in welcomeAction.pl that is referenced in the error messageAny help would be greatly appreciated.1)----------welcomeAction.pl creates the following HTML page:Error: /home/webwork/www/webwork/system/cgi/cgi-scripts/welcomeAction.plUnable to create PDF output using makePDF file: /home/webwork/www/webwork/system/scripts/makePDF /home/webwork/www/webwork/system/courses/Mett_Calc155_Spring02/html/tmp/ setCalc3ShortCuts.tempTex-CGIscript-1 1&2Error is: Bad file number2)--------------------error_log gives the following message:ERROR (/home/webwork/www/webwork/system/cgi/cgi-scripts/welcomeAction.pl) Wed Mar 6 15:07:57 2002: at /home/webwork/www/webwork/system/cgi/cgi-scripts/welcomeAction.pl line 581---------------The "offending" code in welcomeAction.pl is in the pdfPrint subroutine below. Line 581 is the one that begins with "system .."3) ------------sub pdfPrint { system( "${scriptDirectory}makePDF$tempDirectory ${texFile}$psvn 1&2" ) == 0 or wwerror("$0", "Unable to create PDF output using makePDF file:${scriptDirectory}makePDF $tempDirectory${texFile}$psvn 1&2Error is:$!", "", ""); open(INPUT, "$tempDirectory${texFile}$psvn.pdf") || wwerror("$0", "Can't open $tempDirectory${texFile}$psvn.pdf:$!\n","",""); print "Content-disposition: attachment; filename= \"${login_name_for_psvn}_Set${setNumber}.pdf"\n"; print "Content-type: application/pdf\n\n" ; while () { print; } close INPUT; print STDERR "Finished TeX $texFile for$login_name_for_psvn in $Course\n" if$debugON;}------------------ <| Post or View Comments |>

 Michael Gage - Re: error in getting hard copy in PDF format (reposting)  3/7/2002; 8:43:50 PM (reads: 1137, responses: 0) Hi, Look at the code in the following file in the scripts directory: system/scripts/makePDF This should be a one or two line command for creating a PDF file from a postscript or perhaps a tex file. Try running that command (with suitable file names inserted) from the command line. This will tell you whether or not you have the correct software for making PDF files on your machine. The software might be located in a different directory than the one we have assumed, so it may be necessary for you to make a modified version of the text file "makePDF" that is customized to your machine. Let us know how this comes out -- and tell us what operation system you are using, since this command is pretty sensitive to different operation systems. That's why it's in an external file. Hope this helps. Take care, Mike <| Post or View Comments |>