discuss-gnustep
[Top][All Lists]
Advanced

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

Re: printing, default printer


From: Ivan Vučica
Subject: Re: printing, default printer
Date: Wed, 14 Dec 2011 21:47:20 +0100

Hi,

that definitely sounds like it should work without a printer. Maybe the way PS file is generated is causing trouble?

On Wed, Dec 14, 2011 at 21:44, Eric Wasylishen <ewasylishen@gmail.com> wrote:
Hi,
The print dialog needs some work. 

However, last time I checked, it is possible to save a PDF with the "save" button - you just have to save to a filename ending in .pdf, and be using the cairo backend. Also, saving to a .ps file should produce a PostScript file with either the cairo or libart backend; not sure about other backends.

Pressing "preview" saves a PostScript file and does the following with it (GSPrintOperation.m):

      /* Check to see if there is a GNUstep app that can preview PS files.
      It's not likely at this point, so also check for a standards
      previewer, like gv.
      */
      NSTask *task;
      NSString *preview;
      NSWorkspace *ws = [NSWorkspace sharedWorkspace];
      [[self printPanel] _setStatusStringValue: @"Opening in previewer..."];
      
      preview = [ws getBestAppInRole: @"Viewer" 
                        forExtension: @"ps"];
      if (preview)
        {
          [ws openFile: _path withApplication: preview];
        }
      else
        {
          NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
          preview = [def objectForKey: @"NSPreviewApp"];
          
 if (preview == nil || [preview length] == 0)
   preview = @"gv";
            
 NS_DURING
   {
     task = AUTORELEASE([NSTask new]);
     [task setLaunchPath: preview];
     [task setArguments: [NSArray arrayWithObject: _path]];
     [task launch];
   }
  ...

Once Julian's NSWorkspace patch is integrated we should be able to simplify that to just [ws openFile: _path]; and let NSWorkspace pick a non-GNUstep application if there is no GS pdf/ps viewer.

-Eric

On 2011-12-14, at 1:23 PM, Ivan Vučica wrote:

OS X creates a PDF to produce a print preview, then opens it in Preview.app. What does GNUstep do? Is producing a PDF/PostScript viable? Is it a good idea?

On Wed, Dec 14, 2011 at 12:19, Riccardo Mottola <riccardo.mottola@libero.it> wrote:
Hello,

I want to print-preview a document. I'm on OpenBSD, cups is installed, but no printer is  configured.

I use Print ... -> "preview".

The only printer I see is "Unnamed". That's fine I think, I suppose I should be able to preview  a document without having any printer installed.

When I do preview, I get "nothing". The same happens if choose "Save".

In the console I see:

lpr: Unnamed: unknown printer

What could be wrong? I think to remember that we used to have a "Dummy printer". But perhaps that was on another operating system or another cups version? I'm unsure.

Riccardo

_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep



--
Ivan Vučica - ivan@vucica.net


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep




--
Ivan Vučica - ivan@vucica.net



reply via email to

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