mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:20:37 +00:00
Allow saving a print job as a PDF
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32559 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a86694d315
commit
b4956bb4ac
4 changed files with 30 additions and 7 deletions
|
@ -117,9 +117,17 @@
|
|||
|
||||
[info setObject: _path
|
||||
forKey: @"NSOutputFile"];
|
||||
|
||||
[info setObject: NSGraphicsContextPSFormat
|
||||
forKey: NSGraphicsContextRepresentationFormatAttributeName];
|
||||
|
||||
if ([[[_path pathExtension] lowercaseString] isEqualToString: @"pdf"])
|
||||
{
|
||||
[info setObject: NSGraphicsContextPDFFormat
|
||||
forKey: NSGraphicsContextRepresentationFormatAttributeName];
|
||||
}
|
||||
else
|
||||
{
|
||||
[info setObject: NSGraphicsContextPSFormat
|
||||
forKey: NSGraphicsContextRepresentationFormatAttributeName];
|
||||
}
|
||||
|
||||
_context = RETAIN([NSGraphicsContext graphicsContextWithAttributes: info]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue