png generation and lilypond 2.5.29-2 on winxp

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

png generation and lilypond 2.5.29-2 on winxp

Roman V. Isaev

I installed 2.5.29-2 and everyhing was same -- no png generation at all.
And I could not get any diagnostics after make-ps-images got called.
Everything gets silent after this:

    (ly:message (_ "Converting to ~a...") "PNG")
    (make-ps-images name resolution paper-size rename-page-1? verbose?)

"Converting to PNG" line is the last in the log file and then nothing.  
(ly:message "test\n") works okay if inserted before make-ps-images call but
not after or inside make-ps-images.

I even moved whole contents of ps-2-png.scm into backend-library.scm. No luck.
But I noticed that with --png command line option dos window comes up
twice. So I renamed gs.exe and made gs.bat with pause after ghostscript
invocation. Here is output -- apparently ghostscript fails when it tries
to generate png on my machine:

GPL Ghostscript 8.15 (2004-09-22)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in ('canzone.ps')
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push
Dictionary stack:
   --dict:1129/1686(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 8.15: Unrecoverable error, exit code 1

Any clues how to fix this?..

--
 Roman V. Isaev         http://www.soprano-recorder.ru         Moscow, Russia


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Jan Nieuwenhuizen
Roman V. Isaev writes:

> GPL Ghostscript 8.15 (2004-09-22)
> Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> Error: /undefinedfilename in ('canzone.ps')
> Operand stack:
>
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
> -   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
> lse   1   %stopped_push
> Dictionary stack:
>    --dict:1129/1686(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
> Current allocation mode is local
> Last OS error: No such file or directory
> GPL Ghostscript 8.15: Unrecoverable error, exit code 1
>
> Any clues how to fix this?..

This one is easy; you may have found the mystery problem.

canzone.ps does not exist in the current working directory (cwd).
Chances are that cwd is wrong or it needs a directory part.

Try adding 'dir' to your .bat file, to see what files are there, and
what directory you are in.

Jan.

--
Jan Nieuwenhuizen <[hidden email]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Han-Wen Nienhuys
Jan Nieuwenhuizen wrote:
>
>
> This one is easy; you may have found the mystery problem.
>
> canzone.ps does not exist in the current working directory (cwd).
> Chances are that cwd is wrong or it needs a directory part.
>
> Try adding 'dir' to your .bat file, to see what files are there, and
> what directory you are in.

another option is that he is using a lilypond version which deletes the
intermediate .ps and then tries to convert said ps to png.  I've fixed
this recently, I believe.



--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Roman V. Isaev
In reply to this post by Jan Nieuwenhuizen
On 06/15, Jan Nieuwenhuizen wrote:
> > Last OS error: No such file or directory
> > GPL Ghostscript 8.15: Unrecoverable error, exit code 1
> > Any clues how to fix this?..
> This one is easy; you may have found the mystery problem.
> canzone.ps does not exist in the current working directory (cwd).
> Chances are that cwd is wrong or it needs a directory part.
> Try adding 'dir' to your .bat file, to see what files are there, and
> what directory you are in.

My home directory is correct, I've added pwd command...

GPL Ghostscript 8.15 (2004-09-22)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in ('canzone.ps')
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push
Dictionary stack:
   --dict:1129/1686(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 8.15: Unrecoverable error, exit code 1
pwd
/home/rm

My cygwin home dir is /home/rm and everything works perfectly here.

I've installed 2.5.31-1, problem persists. BTW it does not erase
.ps file.

--
 Roman V. Isaev         http://www.soprano-recorder.ru         Moscow, Russia



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Jan Nieuwenhuizen
Roman V. Isaev writes:

> My home directory is correct, I've added pwd command...

and canzone.ps is there too, if you add ls command?

> Error: /undefinedfilename in ('canzone.ps')

ah, I think I see: what about the quotes?  they may have to be removed
from the command, similar too the ps->pdf command.


> pwd
> /home/rm
>
> My cygwin home dir is /home/rm and everything works perfectly here.
>
> I've installed 2.5.31-1, problem persists. BTW it does not erase
> .ps file.

Jan

--
Jan Nieuwenhuizen <[hidden email]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Roman V. Isaev
On 06/16, Jan Nieuwenhuizen wrote:
> > My home directory is correct, I've added pwd command...
> and canzone.ps is there too, if you add ls command?

        Yep.
 
> > Error: /undefinedfilename in ('canzone.ps')
> ah, I think I see: what about the quotes?  they may have to be removed
> from the command, similar too the ps->pdf command.

        Yep! That did the trick. I had to remove quotes both from ps filename parameter
 and -sOutputFile too. And after that ghostscript's banner disappeared from dos
window, it works now, but silently. Strange. Anyway here is what I did:

=========
--- ps-to-png.save 2005-06-15 17:26:16.000000000 +0400
+++ ps-to-png.scm 2005-06-16 23:20:10.000000000 +0400
@@ -101,10 +101,10 @@
  -dNOPAUSE\
  -dTextAlphaBits=4\
  -sDEVICE=png16m\
- -sOutputFile='~a'\
+ -sOutputFile=~a\
  -sPAPERSIZE=~a\
  -r~S\
- '~a'\
+ ~a\
  -c showpage\
  -c quit"
    (search-gs)
@@ -118,9 +118,9 @@
  -dNOPAUSE\
  -dTextAlphaBits=4\
  -sDEVICE=png16m\
- -sOutputFile='~a'\
+ -sOutputFile=~a\
  -r~S\
- '~a'\
+ ~a\
  -c quit"
    (search-gs)
    (if verbose? "" "-q")
=========

        But now I've got a new problem :) Canzone fits one page with global staff size 21/
When I increase it size a little so it stretches into second page I get
two pages in .pdf file, but three png files instead of two, and the last png is blank.
Second png has a lot of space at the the end.

        Another problem: it truncates bottom of the page. Something wrong with paper size,
but I don't know how to fix it.

--
 Roman V. Isaev         http://www.soprano-recorder.ru         Moscow, Russia



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Jan Nieuwenhuizen
Roman V. Isaev writes:

> Yep! That did the trick. I had to remove quotes both from ps filename parameter
>  and -sOutputFile too. And after that ghostscript's banner disappeared from dos
> window, it works now, but silently. Strange. Anyway here is what I did:

Good.  I already changed this in CVS, but replaced '~a' with ~S, so
that you get double quotes.  That should work also for file names with
spaces.

> But now I've got a new problem :) Canzone fits one page with global staff size 21/
> When I increase it size a little so it stretches into second page I get
> two pages in .pdf file, but three png files instead of two, and the last png is blank.
> Second png has a lot of space at the the end.

> Another problem: it truncates bottom of the page. Something wrong with paper size,
> but I don't know how to fix it.

What papersize do you use?  Can you post canzone.ly?

> Another problem: it truncates bottom of the page. Something wrong with paper size,


Jan.

--
Jan Nieuwenhuizen <[hidden email]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Han-Wen Nienhuys
Jan Nieuwenhuizen wrote:
>> But now I've got a new problem :) Canzone fits one page with global staff size 21/
>>When I increase it size a little so it stretches into second page I get
>>two pages in .pdf file, but three png files instead of two, and the last png is blank.
>>Second png has a lot of space at the the end.
>
>
> What papersize do you use?  Can you post canzone.ly?


the empty png problem is generic. The files on lilypond.org have it too.



--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Roman V. Isaev
In reply to this post by Jan Nieuwenhuizen
On 06/16, Jan Nieuwenhuizen wrote:
> > window, it works now, but silently. Strange. Anyway here is what I did:
> Good.  I already changed this in CVS, but replaced '~a' with ~S, so
> that you get double quotes.  That should work also for file names with
> spaces.

        Nope, it does not :) Just tried to use filename with space. Lilypond
makes ps and pdf, but no png. Error message is:
Error: /undefinedfilename in (hoho-page%d.png)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push
Dictionary stack:
   --dict:1125/1686(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 8.15: Unrecoverable error, exit code 1

Lilypond was called this way:

/cygdrive/j/lilypond/usr/bin/lilypond.exe --png --ps --pdf "hehe hoho.ly"

> > But now I've got a new problem :) Canzone fits one page with global staff size 21/
> > When I increase it size a little so it stretches into second page I get
> > two pages in .pdf file, but three png files instead of two, and the last png is blank.
> > Second png has a lot of space at the the end.
> > Another problem: it truncates bottom of the page. Something wrong with paper size,
> > but I don't know how to fix it.
> What papersize do you use?  Can you post canzone.ly?

        Umm, I don't know what papersize I use. Probably something default. All canzone
related files are here: http://www.soprano-recorder.ru/tmp -- .ly, pdf and all three
png files.
 
--
 Roman V. Isaev         http://www.soprano-recorder.ru         Moscow, Russia



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: png generation and lilypond 2.5.29-2 on winxp

Jan Nieuwenhuizen
Roman V. Isaev writes:

>> Good.  I already changed this in CVS, but replaced '~a' with ~S, so
>> that you get double quotes.  That should work also for file names with
>> spaces.
>
> Nope, it does not :)

How odd.  Maybe try use "~a" then, instead of ~S.  It could be that it
only works for spaces in the directory part, and that GS is broken.

>> What papersize do you use?  Can you post canzone.ly?
>
> Umm, I don't know what papersize I use. Probably something default. All canzone
> related files are here: http://www.soprano-recorder.ru/tmp -- .ly, pdf and all three
> png files.

Ok, thanks.

--
Jan Nieuwenhuizen <[hidden email]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user