• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Long tale of woe regarding NSPrintInfo, NSPageLayout, etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Long tale of woe regarding NSPrintInfo, NSPageLayout, etc.


  • Subject: Long tale of woe regarding NSPrintInfo, NSPageLayout, etc.
  • From: "Simson Garfinkel" <email@hidden>
  • Date: Fri, 22 Feb 2002 22:05:44 -0500

I've been trying to do envelope printing and just having a terrible time.

In particular, I'm trying to do the following:

1. I'd like to print without having an NSPrintPanel appear.

2. I'd like to get the name of the currently selected paper. You would think
that you could do this with [printInfo paperName] but that always returns
"".

3. In fact, if I do an NSLog() on an NSPaperInfo object after I run the Page
Layout panel, here's what it looks like:

002-02-22 21:59:02.252 SBook5[3056] pi: {
NSBottomMargin = 0;
NSCopies = 1;
NSFirstPage = 1;
NSHorizonalPagination = 2;
NSHorizontallyCentered = 1;
NSJobDisposition = NSPrintSpoolJob;
NSJobFeatures = {};
NSLastPage = 2147483647;
NSLeftMargin = 0;
NSOrientation = 1;
NSPagesPerSheet = 1;
NSPaperName = "";
NSPaperSize = <442b0000 43948000 >;
NSPrintAllPages = 0;
NSPrintReverseOrientation = 1;
NSReversePageOrder = 0;
NSRightMargin = 0;
NSScalingFactor = 1;
NSTopMargin = 0;
NSVerticalPagination = 0;
NSVerticallyCentered = 1;
}

And here is what the dictionary it contains looks like:

2002-02-22 21:59:02.253 SBook5[3056] dict: <CFDictionary 0x2ac81e0
[0x8016024c]>{count = 21, capacity = 22, pair\
s = (
0 : NSPagesPerSheet = 1
1 : NSJobDisposition = NSPrintSpoolJob
2 : NSBottomMargin = 0
5 : NSPaperName =
6 : NSPrintAllPages = <CFBoolean 0x49c340 [0x8016024c]>{value =
false}
8 : NSJobFeatures = <CFDictionary 0x2ce9880 [0x8016024c]>{count = 0,
capacity = 11, pairs = (
)}
10 : NSRightMargin = 0
12 : NSCopies = 1
16 : NSScalingFactor = 1
17 : NSFirstPage = 1
18 : NSVerticalPagination = 0
19 : NSReversePageOrder = <CFBoolean 0x49c340 [0x8016024c]>{value =
false}
20 : NSHorizonalPagination = 2
21 : NSHorizontallyCentered = <CFBoolean 0x49c330
[0x8016024c]>{value = true}
22 : NSLeftMargin = 0
26 : NSOrientation = 1
27 : NSPrintReverseOrientation = <CFBoolean 0x49c330
[0x8016024c]>{value = true}
28 : NSLastPage = 2147483647
29 : NSTopMargin = 0
30 : NSVerticallyCentered = <CFBoolean 0x49c330 [0x8016024c]>{value
= true}
31 : NSPaperSize = <442b0000 43948000 >
)}


4. I've tried playing around with margins. This may have been a very bad
idea. My printer flashes it's activity light to indicate that something is
coming through, then it stops flashing, and nothing prints. I have a
PostScript-enabled HP MP5.

I have literally spent all day on this. This is not supposed to be this
hard.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSFileManager
  • Next by Date: Re: number formatting
  • Previous by thread: Re: NSFileManager
  • Next by thread: Disk Image build in PB
  • Index(es):
    • Date
    • Thread