mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +00:00
Load prolog.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14863 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3766e95ce1
commit
6b65871481
9 changed files with 47 additions and 12 deletions
|
@ -3321,6 +3321,22 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
DPSPrintf(ctxt, "%%%%EOF\n");
|
||||
}
|
||||
|
||||
- (void) _loadPrinterProlog: (NSGraphicsContext *)ctxt
|
||||
{
|
||||
NSString *prolog;
|
||||
prolog = [NSBundle pathForGNUstepResource: @"GSProlog"
|
||||
ofType: @"ps"
|
||||
inDirectory: @"PrinterTypes"];
|
||||
if (prolog == nil)
|
||||
{
|
||||
NSLog(@"Cannot find printer prolog file");
|
||||
return;
|
||||
}
|
||||
prolog = [NSString stringWithContentsOfFile: prolog];
|
||||
DPSPrintf(ctxt, [prolog cString]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Writes header and job information for the PostScript document. This
|
||||
includes at a minimum, PostScript header information. It may also
|
||||
|
@ -3377,7 +3393,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
[self endHeaderComments];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%BeginProlog\n");
|
||||
// Prolog goes here !
|
||||
[self _loadPrinterProlog: ctxt];
|
||||
[self endPrologue];
|
||||
if ([printOp isEPSOperation] == NO)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue