• 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
Re: Printing issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing issues


  • Subject: Re: Printing issues
  • From: Andrew Kinnie <email@hidden>
  • Date: Fri, 22 Apr 2005 06:42:45 -0400

Yeah, I found that one, but that doesn't help me get the available paper sizes for a given printer, because I need to know the name of the paper in order to use the method. For Letter and Legal, that is fine, but I won't know what different receipt printer manufacturers may be calling their custom receipt page sizes.

Also, apparently it relies on what is in the PPD file, and it doesn't appear that Star Micronics (for example) has a PPD file for its printer (the one I am testing on). At least nothing showed when I did a global search for file names containing ppd after installing the drivers.

I can only assume this is why when I hard coded the name of the receipt paper into the app, and tried to use this method, it returned nil.

I'm hoping I can do this so I won't need to change to code every time a new receipt printer is released by someone. That would seem rather irrational to me.

On Apr 21, 2005, at 10:56 PM, Frank Fenn wrote:

Hi Andrew,

Second, I also hand coded the paper size, because I can't figure out how to determine the available paper sizes for a particular printer. Is there a way to do this?

NSPrinter

pageSizeForPaper:

<x-tad-bigger>- (</x-tad-bigger><x-tad-bigger>NSString</x-tad-bigger><x-tad-bigger> *)</x-tad-bigger><x-tad-bigger>paperName
</x-tad-bigger>
Returns the size of the page for the paper type paperName. Possible values for paperName are contained in the printer’s PPD file. Typical values are Letter and Legal. Returns a zero size if paperName is not recognized, or its entry in the PPD cannot be parsed.

Sincerely,
Frank Fenn

--

Bright Light Software - http://www.brightlightsoftware.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Printing issues (From: Andrew Kinnie <email@hidden>)

  • Prev by Date: Re: Memory management with nibs
  • Next by Date: Re: subversion support in XCode?
  • Previous by thread: Re: Printing issues
  • Next by thread: Re: Printing issues
  • Index(es):
    • Date
    • Thread