bugDenemo - Bugs: bug #30434, Print view doesn't work

 
 

bug #30434: Print view doesn't work

Submitter:  None
Submitted:  Tue 13 Jul 2010 05:27:15 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 10 Aug 2010 10:00:08 AM UTC, comment #9: 

I have verified that the build marked c by Nils is working for both print and printview so this is at long last closed. The problem was trying to launch lilypond with a pipe open to collect stderr. This is not working on windows, and I hope to replace capturing errors from the lilypond run with an internal run of our own lilypond parser to check for errors.

Richard Shann <rshann>
Group administrator
Fri 30 Jul 2010 04:26:29 PM UTC, comment #8: 

Ok, I have put -dgui on the command line and called lilypond-windows.exe directly. So the batch file is gone. I'll mark this as fixed, although until a gub build is verified this may be just wishful thinking...

Richard Shann <rshann>
Group administrator
Thu 29 Jul 2010 10:01:07 PM UTC, comment #7: 

I made denemo-lilypond.bat a bit smarter.  Using this version, it will work for Print View, and will still work as well as it did for Print Preview.  (It seems my earlier hunch about Ghostscript getting in the way of the pdf viewer when Print Preview is run was totally wrong)
-DW


@echo off
rem We have to process a little because batch interpreter treats equals signs
rem as whitespace.
if %1 == --png goto PNG
echo on
lilypond-windows.exe -dgui %1 %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF
:PNG
echo on
lilypond-windows.exe -dgui %1 %2=%3 %4=%5 %6 %7 %8 %9

(file #21102)

Anonymous
Thu 29 Jul 2010 07:51:18 PM UTC, comment #6: 

In other words, the way it was, works for Print Preview; the new way works only for Print View.-DW

Anonymous
Thu 29 Jul 2010 06:34:46 PM UTC, comment #5: 

Well, using this file works for the Print View under view menu, but then using the regular Print Preview command doesn't work.  That's what I meant about two versions... unless I'm missing something else.
-DW

Anonymous
Thu 29 Jul 2010 05:54:29 PM UTC, comment #4: 

I have checked in your suggestion - no need for multiple versions I presume, it is only for the windows .bat interpreter.
As a proper fix we could put the command line in this .bat file apart from the value of the filename and the resolution, I guess.

Richard Shann <rshann>
Group administrator
Thu 29 Jul 2010 05:42:17 PM UTC, comment #3: 

http://support.microsoft.com/kb/35938
Equal signs are considered whitespace when they appear as arguments in batch files.  It says this is impossible to change.

Maybe have two versions of denemo-lilypond.  One would include the equals signs in it automatically?? 

lilypond-windows.exe -dgui %1 %2=%3 %4=%5 %6 %7 %8 %9

would work--could call it denemo-lilypond-eq.bat or something.  Not ideal, but this is a very annoying limitation of the windows batch file interpreter.
-Dan W.

Anonymous
Thu 29 Jul 2010 05:31:42 PM UTC, comment #2: 

The origin of this problem is pretty ridiculous.

I ran

denemo-lilypond a=b

at a command line, just to see if my suspicion held true, and sure enough, the output was

lilypond-windows.exe -dgui a b

so, in windows, using command line arguments in the way that denemo-lilypond.bat does, it DELETES EQUALS SIGNS.

Nothing occurs to me as to how to fix this--hope it won't take too much work.
-Dan W.

Anonymous
Thu 29 Jul 2010 03:45:01 PM UTC, comment #1: 

I've tried to track this down a bit, and apparently the problem is that when denemo issues the lilypond command, it doesn't use the right syntax for the commandline options, and consequently no .png is created, and existing .png's are deleted. 

Specifically, here's what denemo currently does when you try to update the print view in the windows dos box:
lilypond-windows.exe -dgui --png -dbackend eps -dresolution 180 -o "...\.denemo\denemoprint_" "...\.denemo\denemoprint_.ly"

Running this command from the commandline (after explicitly specifying the path for lilypond-windows as needed) does not work, and produces some kind of error about ps-to-png.ly not being there.

However, this works executed from the command line, producing the png:
C:\"Program Files"\Denemo\usr\bin\lilypond-windows.exe -dgui --png -dbackend=eps -dresolution=180 -o "...\.denemo\denemoprint_" "...\.denemo\denemoprint_.ly"

the crucial difference being in: -dbackend=eps -dresolution=180.  The command issued by denemo lacks the = signs.

Indeed, I have confirmed that fixing this fixes the problem.  As a hack fix, I changed denemo-lilypond.bat to read

lilypond-windows.exe -dgui %1 %2=%3 %4=%5 %6 %7 %8 %9

and now the print view pane works.  (The image size is way too big at the moment, with lilypond in 20 point--this can be fixed by changing to -dresolution=90 or so, but that might affect drag-to-offset.  Zooming would be nice to implement here, but I suppose it's not crucial.)  It is crucial that there not be spaces between the two sides of each equality.  So wherever the command to update the preview pane is issued, that needs to be adjusted to use this synatx.
-Dan W.

Anonymous
Tue 13 Jul 2010 05:27:15 PM UTC, original submission:  

0.8.19 on windows xp, go to View, Print View.
Nothing shows up no matter whether I refresh view or try print preview, etc.
Maybe related to the need to run print preview twice before anything appears at all, on my machine?

-Dan W.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21102:  denemo-lilypond.bat added by None (270B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rshann (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-10 rshann Open/ClosedOpen Closed
    2010-07-30 rshann StatusNone Fixed
    2010-07-29 None Attached File- Added denemo-lilypond.bat, #21102

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code