octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fltk printing


From: Ben Abbott
Subject: Re: fltk printing
Date: Fri, 06 Aug 2010 21:53:21 -0400

On Aug 6, 2010, at 6:30 PM, Michael D Godfrey wrote:

> Ben,
> 
> You asked for:
> 
> [qss:octave] gs -v
> GPL Ghostscript 8.71 (2010-02-10)
> Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
> 
> octave:1> plot(1:10)
> octave:2> print test.pdf -debug
> GPL Ghostscript 8.71: Unrecoverable error, exit code 1
> ---- begin /tmp/oct-q2Hi98.ps ----
> %!PS-Adobe-3.0
> << /Margins [0 0] /.HWMargins [0 0 0 0] /PageOffset [18 180] >> setpagedevice
> %EOF
> ----- end /tmp/oct-q2Hi98.ps -----
> Ghostscript command: /usr/bin/gs -dQUIET -dNOPAUSE -dBATCH -dSAFER 
> -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -sPAPERSIZE=letter 
> -dFIXEDMEDIA -sOutputFile=test.pdf /tmp/oct-q2Hi98.ps /tmp/oct-qAirIj.eps
> warning: print.m: ghostscript failed to convert output to file 'test.pdf'.
> No such file or directory
> warning: print.m: failed to delete temporay file, '/tmp/oct-qAirIj.eps'.
> octave:3> 
> But, in /tmp are:
> -rw-rw-r-- 1 godfrey godfrey   97 Aug  6 15:03 /tmp/oct-q2Hi98.ps
> -rw-rw-r-- 1 godfrey godfrey 6308 Aug  6 15:03 /tmp/oct-qAirIj.eps
> 
> And, if I run the gs command after exiting Octave, it runs and produces the 
> intended test.pdf.
> And, the file Aug  6 15:03 /tmp/oct-qAirIj.eps is still in /tmp.
> 
> And, in Octave, I tried:
> octave:2> system('gs -dQUIET -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite 
> -dEmbedAllFonts=true -dOptimize=true -sPAPERSIZE=letter -dFIXEDMEDIA 
> -sOutputFile=test.pdf /tmp/oct-q2Hi98.ps /tmp/oct-qAirIj.eps')
> ans = 0
> And, the expected test.pdf was created.
> 
> So, I do not know what has gone wrong.  Remember also that print('test.pdf') 
> works fine.
> 
> Anything more I can provide?
> 
> Michael

It looks like the eps file isn't recognized as existing when ghostscript is 
called ... and still isn't recognized when unlinked.

Please check that the file is present by adding "dir (opts.ghostscript.source)" 
to __fltk_print__.m in the position indicated below.

  case {"ps", "ps2", "psc", "psc2", "pdf"}
    opts.ghostscript.source = strcat (tmpnam (), ".eps");
    file2unlink = opts.ghostscript.source;
    if (strcmp (opts.devopt, "pdf"))
      opts.ghostscript.device = "pdfwrite";
    else
      opts.ghostscript.device = "pswrite";
    endif
    opts.ghostscript.output = opts.name;
    drawnow ("eps", opts.ghostscript.source);
    dir (opts.ghostscript.source)
    if (opts.tight_flag)
      __tight_eps_bbox__ (opts, opts.ghostscript.source);
    endif
 
Now if you try "print test.pdf", does the dir() command indicate the eps file 
exists?

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]