octave-maintainers
[Top][All Lists]
Advanced

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

Re: fltk printing


From: bpabbott
Subject: Re: fltk printing
Date: Sat, 07 Aug 2010 16:03:27 -0700 (PDT)

On 07 Aug, 2010,at 06:30 PM, Michael D Godfrey <address@hidden> wrote:

On 08/07/2010 02:36 PM, Dmitri A. Sergatskov wrote:
> In any case, I just verified that the opts passed to __fltk_print__.m  is
> the same for
> print test.pdf and print('test.pdf').   But, test.pdf still always fails and
> ('test.pdf') always
> works.
>
More fun:

octave:1> backend ("fltk")
octave:2> plot(rand(10))
octave:3> print test1.pdf
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
warning: print.m: ghostscript failed to convert output to file 'test1.pdf'.
No such file or directory
warning: print.m: failed to delete temporay file, '/tmp/oct-Jo1lWX.eps'.
octave:4> plot(rand(20))
octave:5> print test1.pdf
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
warning: print.m: ghostscript failed to convert output to file 'test1.pdf'.
No such file or directory
warning: print.m: failed to delete temporay file, '/tmp/oct-tqNhOA.eps'.
octave:6> plot(rand(50))
octave:7> print test1.pdf
octave:8> plot(rand(10))
octave:9> print test1.pdf
octave:10>
(From this moment on it works)


> Michael
>
>
Dmitri.
--
This email should have preceded my last one, but I forgot to click on
send!

Right.  And, I have learned something:

1, My claim that it mattered whether the command was print test.pdf or
    print('test.pdf') is wrong.  What matters is if the print command is the
    first one issued in the octave session.  After the first  print, everything
    seems to work, both print test.pdf, print('test.pdf'), or print test2.pdf, etc.
   (Dmitri's example shows that it takes more than one print(), but so far
    for me one has been enough.)  But, close all causes failure again.

2.  But, so far I have not been able to get the first print to work.  I have
     waiting for the file to show up as Ben suggested, drawnow(), rehash(),
    etc.

3. One point: after the failure, at the command line:
    system(' ls -l /tmp/oct-xxxx') shows that the file does exist.  

Michael 
 
This is looking rather confusing for me. Perhaps it is a bad idea to repeat the same print command each time. Meaning more info might be obtained if both the plot data and the filename were changed on each print attempt.

For example, what happens with ...

    x = 0:0.1:10;
    plot (x, sin(x))
    print sin.pdf
    plot (x, cos(x))
    print cos.pdf

Ben




reply via email to

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