Forum archive 2000-2006

Jason - Bad file number when creating PDF

Jason - Bad file number when creating PDF

by Arnold Pizer -
Number of replies: 0
inactiveTopicBad file number when creating PDF topic started 3/24/2002; 1:14:03 PM
last post 3/26/2002; 10:26:50 AM
userJason - Bad file number when creating PDF  blueArrow
3/24/2002; 1:14:03 PM (reads: 1010, responses: 1)
Hello everyone. We have been having a rather menacing problem with Webwork lately. When we try to download a hard copy in PDF format it returns this statement: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: /home/webwork/www/webwork/system/cgi/cgi-scripts/welcomeAction.pl Unable to create PDF output using makePDF file: /home/webwork/www/webwork/system/scripts/makePDF /home/webwork/www/webwork/system/courses/Math104_Spring02_Kirtner/html/tmp/ setCmAlgebra1.tempTex-CGIscript-1 1>&2Error is: Bad file number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ But when I execute my makePDF script directly from the commandline using the appropiate arguments, it successfully creates a PDF. I also used the debug option on welcomeAction.pl, and looked into the /home/webwork/www/webwork/system/courses/Math104_Spring02_Kirtner/html/tmp/ for a PDF file and there is none.

Any help someone may have would be greatly appreciated! Thank you!

Jason (jasonf009@yahoo.com)

<| Post or View Comments |>


userArnold K. Pizer - Re: Bad file number when creating PDF  blueArrow
3/26/2002; 10:26:50 AM (reads: 1226, responses: 0)
Hi Jason,

It sounds like in your case pdf output was working, but now no longer works. If this is true, almost certainly something has changed, e.g. the location where ghostscript can be found. In the current 1.7 version of WeBWorK, pdf output is created by a call to the gs command. This is controlled by the Local external programs variable $externalGsPath in the file .../system/lib/Global.pm. This command is usually "/usr/bin/gs" or "/usr/local/bin/gs". Check that this is set correctly for your system. Also check that the webserver has permission to run this program although this is a much more unlikely problem. You can see the actual call to this command in the file .../cgi-scripts/welcomeAction.pl.

For older versions of WeBWorK, pdf output was controlled by the file .../scripts/makePDF. Again the usual problem is that system dependent path variable is not set correctly. Look at http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$814#815 and/or search for pdf on the sidebar to the left.

Arnie

<| Post or View Comments |>