Contents

PMPaperCreateLocalizedName(_:_:_:)

Obtains the localized name for a given paper.

Declaration

func PMPaperCreateLocalizedName(_ paper: PMPaper, _ printer: PMPrinter, _ paperName: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus

Parameters

  • paper:

    The paper whose localized name you want to obtain.

  • printer:

    The printer for which the localization should be performed.

  • paperName:

    A pointer to your Cfstring variable. On return, the variable refers to a Core Foundation string that contains the localized name of the paper. This name is appropriate to display in the user interface. If an error occurs, the variable is set to NULL. You are responsible for releasing the string.

Return Value

A result code. See Result Codes.

Discussion

Not all printers have the same way of referring to a given paper. Generally, if you want to obtain the name of a paper, you want to localize the paper name for a particular printer. For example, if you were displaying a list of papers for a given printer, you would want the paper names to be localized for that printer.

Special Considerations

In macOS 10.5 and later, Apple recommends using this function instead of PMPaperGetName.

See Also

Accessing Data in Paper Objects