获取通过通用打印连接器注册的打印机的功能

进程

若要将打印机的功能从其驱动程序转换为受支持的 IPP 属性,通用打印遵循以下过程:

步骤 1:连接器从通过打印设备功能(PDC)使用的驱动程序获取打印机的功能。 如果 PDC 不可用,通用打印使用打印功能(PC)和打印票证(PT)的组合来生成 PDC。

步骤 2:通用打印分析 PDC XML 并将元素和选项映射到 IPP 打印机说明属性(PDA)。 如果未找到映射,则从通用打印打印机选项中忽略并删除 PDC 打印属性。 例如,如果 A6 纸张选项按原样ns0001:ISOA6_PAPER列出PageMediaSize,则无法识别它。 但是,如果包含 psk:ISOA6 它,则它将接受并转换为相应的 IPP 属性。

命名空间

将顶级 PDC 元素映射到 IPP 打印机说明属性时,通用打印仅查看元素的名称并忽略命名空间。 例如, psk:PageOutputColor 映射到 print-color-mode-supported,但如果元素 ns0001:PageOutputColor 是它仍将正确 print-color-mode-supported映射到。

对于元素下方的选项,通用打印有时需要命名空间匹配,并且当前支持下面的命名空间。 如果在 PDC 到 IPP 映射表中未提供任何命名空间,这意味着无论命名空间如何,都会执行转换。

命名空间 URL
ns0000 http://schemas.microsoft.com/windows/2018/04/printing/printschemakeywords/Ipp
xsi http://www.w3.org/2001/XMLSchema-instance
xsd http://www.w3.org/2001/XMLSchema
xml http://www.w3.org/XML/1998/namespace
psk http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords
psk12 http://schemas.microsoft.com/windows/2013/12/printing/printschemakeywordsv12
psf http://schemas.microsoft.com/windows/2003/08/printing/printschemaframework
psf2 http://schemas.microsoft.com/windows/2013/12/printing/printschemaframework2

PDC 到 IPP 的映射

下面介绍了如何将元素和选项从 PDC 映射到 IPP。

PDC 顶级元素 IPP 打印机说明属性 PDC 顶级元素下的选项 IPP 打印机说明属性中的值
PageOutputColor print-color-mode-supported
print-color-mode-default
psk:Monochrome monochrome
psk:Color color
psk:Grayscale monochrome
psk:Highlight highlight
JobCopiesAllDocuments copies-supported
copies-default
MaxValue 用作 . 中的 copies-supported range最大值。 1 始终用作最小值
DefaultValue 用作 中的值 copies-default
PageOrientation orientation-requested-supported
orientation-requested-default
psk:Portrait 3
psk:Landscape 4
psk:ReverseLandscape 5
psk:ReversePortrait 6
DocumentDuplex
JobDuplexAllDocumentsContiguously
sides-supported
sides-default
psk:OneSided one-sided
psk:TwoSidedLongEdge two-sided-long-edge
psk:TwoSidedShortEdge wwo-sided-short-edge
PageMediaSize media-supported
media-default

media-col-database
media-col-default
_4X6 na_index-4x6_4x6in
_5X7 na_5x7_5x7in
_5X8 na_index-5x8_5x8in
Br3x5 na_index-3x5_3x5in
CreditCard om_card_54x86mm
EnglishPhoto-L oe_photo-l_3.5x5in
ISOA3 iso_a3_297x420mm
ISOA4 iso_a4_210x297mm
ISOA5 iso_a5_148x210mm
ISOA6 iso_a6_105x148mm
^ 请参阅备注 ISOB5Envelope iso_b5_176x250mm
^ 请参阅备注 ISOC4Envelope iso_c4_229x324mm
^ 请参阅备注 ISOC5Envelope iso_c5_162x229mm
^ 请参阅备注 ISODLEnvelope iso_dl_110x220mm
^ 请参阅备注 JapanChou3Envelope jpn_chou3_120x235mm
^ 请参阅备注 JapanChou40Envelope jpn_chou40_90x225mm
^ 请参阅备注 JapanChou4Envelope jpn_chou4_90x205mm
JapanHagakiPostcard jpn_hagaki_100x148mm
^ 请参阅备注 JapanKaku2Envelope jpn_kaku2_240x332mm
^ 请参阅备注 JapanYou4Envelope jpn_you4_105x235mm
JISB4 jis_b4_257x364mm
JISB5 jis_b5_182x257mm
MetricPhoto-L om_dsc-photo_89x119mm
NorthAmerica3x5 na_index-3x5_3x5in
NorthAmerica4x6 na_index-4x6_4x6in
NorthAmerica4x6Postcard na_index-4x6_4x6in
NorthAmerica5x7 na_5x7_5x7in
NorthAmerica5x8 na_index-5x8_5x8in
NorthAmerica8x10 na_govt-letter_8x10in
NorthAmerica11x17 na_ledger_11x17in
NorthAmericaExecutive na_executive_7.25x10.5in
NorthAmericaLegal na_legal_8.5x14in
NorthAmericaLetter na_letter_8.5x11in
^ 请参阅备注 NorthAmericaMonarchEnvelope na_monarch_3.875x7.5in
^ 请参阅备注 NorthAmericaNumber10Envelope na_number-10_4.125x9.5in
^ 请参阅备注 NorthAmericaNumber9Envelope na_number-9_3.875x8.875in
NorthAmericaStatement na_invoice_5.5x8.5in
NorthAmericaTabloid na_ledger_11x17in
MediaSizeWidth media-col entrymedia-size->x-dimension
MediaSizeHeight media-col entrymedia-size->y-dimension
BorderlessImageableSize media-col-entrymedia-*-margin (计算)

* 指示顶部、底部、左、右
PortraitImageableSize media-col-entrymedia-*-margin (计算)

* 指示顶部、底部、左、右

(仅当找不到元素时才 BorderlessImageableSize 使用)
PageMediaType media-type-supported

media-col-database
media-col-default
Auto auto
AutoSelect auto
Color stationery-colored
Colored stationery-colored
Envelope envelope
EnvelopePlain envelope
Heavy stationery-heavyweight
HeavyweightPaper stationery-heavyweight
Label labels
Labels labels
Letterhead stationery-letterhead
Light stationery-lightweight
LightweightPaper stationery-lightweight
LxkColorPaper stationery-colored
LxkHeavy stationery-heavyweight
LxkLight stationery-Lightweight
MediaAutoSelect auto
Photographic photographic
PhotographicGlossy photographic-glossy
PhotographicHighGloss photographic-high-gloss
PhotographicSemiGloss Photographic-semi-gloss
Plain stationery
Thick stationery-heavyweight
Thin stationery-lightweight
Transparency transparency
stationery-letterhead stationery-letterhead
stationery-lightweight stationery-lightweight
DocumentNUp
JobNUpAllDocumentsContiguously
number-up-supported
number-up-default
Psk:PagesPerSheet 循环访问所有 PDC PagesPerSheet 元素,将其添加到受支持的值集。 将默认元素用于 number-up-default.
DocumentCollate multiple-document-handling-supported
multiple-document-handling-default

注意:通用打印当前不支持多个文档作业
psk:Collated separate-documents-collated-copies
Psk:Uncollated separate-documents-uncollated-copies
JobInputBin media-source-supported

media-col-database
media-col-default
Alternate alternate
AlternateRoll alternate-roll
Auto auto
AutoSelect auto
autoselect auto
Bottom bottom
ByPassTray by-pass-tray
Bypass-Tray by-pass-tray
Cassette tray-1
Center center
Disc disc
Envelope envelope
EnvFeed envelope
Hagaki hagaki
LargeCapacity large-capacity
Lct large-capacity
Left left
LxkTray1 tray-1
Main main
MainRoll main-roll
Manual manual
ManualFeed manual
Middle middle
Photo photo
Rear rear
Right right
Side side
Top top
DRAWER*
(* indicates numbers 1 through 4)
tray-*
Roll*
(* indicates numbers 1 through 10)
roll-*
Roll-*
(* indicates numbers 1 through 10)
roll-*
Tray*
(* indicates numbers 1 through 20)
tray-*
Tray-*
(* indicates numbers 1 through 20)
tray-*
Cassette*
(* indicates numbers 1 through 20)
tray-*
Cassette-*
(* indicates numbers 1 through 20)
tray-*
psk:FeedDirection
(在每个 JobInputBin 元素下)
media-source-feed-direction
(在条目中media-source-propertiesmedia-col
psk:ShortEdgeFirst short-edge-first
(找不到元素时FeedDirection使用short-edge-first
psk:LongEdgeFirst long-edge-first
JobOutputBin output-bin-supported
output-bin-default
Auto auto
Bottom bottom
BottomBin bottom
Center center
CenterBin center
DestBulkTray large-capacity
DestBulkTrayFU stacker-1
DestMailbox my-mailbox
DestPrinterDefault auto
DestSideTray side
DestTopTray top
FaceDown face-down
Face-Down face-down
FaceUp face-up
Face-Up face-up
LargeCapacity large-capacity
Large-Capacity large-capacity
LargeStacker stacker-1
LargeStacker2 stacker-2
Left left
LeftBin left
LeftTray left
Middle middle
MiddleBin middle
MyMailbox my-mailbox
My-Mailbox my-mailbox
PrinterDefault auto
Rear rear
RearBin rear
Right right
RightBin right
Side side
SideBin side
Stacker stacker-1
Top top
TopBin top
UpperTray top
MailBoxBin*
(* indicates numbers 1 through 9)
mailbox-*
OutputBin*
(* indicates numbers 1 through 10)
tray-*
Tray*
(* indicates numbers 1 through 20)
tray-*
Tray-*
(* indicates numbers 1 through 20)
tray-*
Stacker*
(* indicates numbers 1 through 10)
stacker-*
Stacker-*
(* indicates numbers 1 through 10)
stacker-*
Mailbox*
(* indicates numbers 1 through 25)
mailbox-*
Mailbox-*
(* indicates numbers 1 through 25)
mailbox-*
PageResolution printer-resolution-supported
printer-resolution-default
ResolutionX 值 X 值printer-resolution
ResolutionY 值 Y 值printer-resolution
JobNUpPresentationDirection presentation-direction-number-up-supported
presentation-direction-number-up-default
psf:RightBottom to-right-to-bottom
psf:BottomRight to-bottom-to-right
psf:LeftBottom to-left-to-bottom
psf:BottomLeft to-bottom-to-left
psf:RightTop to-right-to-top
psf:TopRight to-top-to-right
psf:LeftTop to-left-to-top
psf:TopLeft to-top-to-left
DocumentStaple
JobStapleAllDocuments
DocumentHolePunch
JobHolePunch
DocumentBinding
JobBindAllDocuments
finishings-supported
finishings-default
_1diagonal 4
_1diagonalmax15 4
_1diagonalRight 22
_1diagonalZT 4
_1left 20
_1parallel 4
_1PLB_CN 21
_1PLU_CN 20
_1PRU_CN 22
_1Right 22
_1rightAngled 22
_1Staple_PC 4
_1StapleLeftLEPort_SH 20
_1StapleRight_PC 22
_1StapleRightREPort_SH 22
_23PunchBottom 77
_23PunchLeft 74
_23PunchRight 76
_23PunchTop 75
_24PunchBottom 77
_24PunchLeft 74
_24PunchRight 76
_24PunchTop 75
_2leftCM8060 28
_2OnAbv 93
_2OnRev 93
_2parallel 28
_2PB 74
_2PBTOP 75
_2PL 74
_2PL_CN 28
_2PLLandscape 75
_2PU 75
_2PU_CN 29
_2PULEFT 74
_2Right 30
_2StaplesBottom_PC 31
_2StaplesLeft_PC 28
_2StaplesLeftLEPort_SH 28
_2StaplesRight_PC 30
_2StaplesRightREPort_SH 30
_2StaplesTop_PC 29
_2StaplesTopSEPort_SH 29
_2topCM8060 29
_3OnBack 100
_3OnFront 100
_3PunchBottom 81
_3PunchLeft 78
_3PunchRight 80
_3PunchTop 79
_4OnObvIn 97
_4OnObvOut 97
_4OnRevIn 97
_4OnRevOut 97
_4PB 82
_4PBTOP 83
_4PL 82
_4PLLandscape 83
_4PU 83
_4PULEFT 82
_4PunchBottom 85
_4PunchLeft 82
_4PunchRight 84
_4PunchTop 83
Bale 12
Bind 7
BindBottom 53
BindLeft 50
BindRight 52
BindTop 51
COnDownL 96
COnDownR 96
COnUpL 96
COnUpR 96
EdgeStitch 9
EdgeStitchBottom 27
EdgeStitchLeft 24
EdgeStitchRight 26
EdgeStitchTop 25
Fold 10
FoldEngineeringZ 101
FoldHalf 93
FoldLetter 96
FoldParallel 97
FoldZ 100
FourHolesBottom_PC 85
FourHolesBottomSwd_PC 85
FourHolesLeft_PC 82
FourHolesLeftSwd_PC 82
FourHolesRight_PC 84
FourHolesRightSwd_PC 84
FourHolesTop_PC 83
FourHolesTopSwd_PC 83
HolePunch 5
HolePunchDualBottom 77
HolePunchDualLeft 74
HolePunchDualRight 76
HolePunchDualTop 75
HolePunchMultipleBottom 89
HolePunchMultipleLeft 86
HolePunchMultipleRight 88
HolePunchMultipleTop 87
HolePunchQuadBottom 85
HolePunchQuadLeft 82
HolePunchQuadRight 84
HolePunchQuadTop 83
HolePunchTripleBottom 81
HolePunchTripleLeft 78
HolePunchTripleRight 80
HolePunchTripleTop 79
InAnyPB 74
InAnyPL 78
InAnyPLLandscape 79
InAnyPU 79
JogOffset 14
Longside_Left_or_Top 50
Longside_Right_or_Bottom 52
SaddleStitch 8
Shortside_Left_or_Top 51
Shortside_Right_or_Bottom 53
Staple 4
StapleBottomLeft 21
StapleBottomRight 23
StapleDualBottom 31
StapleDualLeft 28
StapleDualRight 30
StapleDualTop 29
StapleTopLeft 20
StapleTopRight 22
ThreeHolesBottom_PC 81
ThreeHolesLeft_PC 78
ThreeHolesRight_PC 80
ThreeHolesTop_PC 79
Trim 11
TwoHolesBottom_PC 77
TwoHolesLeft_PC 74
TwoHolesRight_PC 76
TwoHolesTop_PC 75
ZOnL 101
ZOnR 101
Bottom 89
BottomEdge 89
InAnyPBLEFT 86
InAnyPULEFT 86
InAnyPUTOP 87
Left 86
LeftEdge 86
Right 88
RightEdge 88
Top 87
TopEdge 87
PageOutputQuality print-quality-supported
print-quality-default
psk:Draft 3
psk:Normal 4
psk:High 5

注意

  • 如果在 PDC 中将某个选项标记为默认值,则会将其用作 *-default IPP 属性的值。
  • 若要生成 media-col-database,通用打印会添加媒体大小、媒体类型和媒体源的所有可能组合。
  • 若要生成 media-col-default,通用打印选取使用默认大小、类型和源的组合。
  • 通用打印还可以添加无法从 PDC 翻译的属性,但根据莫普里亚的 IPP 规范(版本 2.0)是必需的。
  • 标记为 ^ 的媒体大小是最近添加到 Windows OS 的信封大小。 它们尚未显示在现有版本的 Windows 上。

诊断缺少的打印机选项

这些步骤可用于诊断为何某些选项未显示通过通用打印连接器注册的通用打印打印机。

  1. 在已注册相应打印机的通用打印连接器,启动连接器应用。
  2. 登录并选择正在调查的打印机。
  3. 单击“收集诊断”按钮。 这将收集诊断信息,并使用与打印机名称对应的存档文件启动文件资源管理器。 打开该文件以访问以下文件:
    1. LocalPcPt.xml或LocalPdc.xml:这是通用打印为打印机选取的 PDC 或 PC/PT。
    2. ServiceAttributes.txt:此文件包含从 PDC 成功生成的 IPP 打印机说明属性。
    3. ServicePdc.xml:这是从 ServiceAttributes.txt 中的 IPP 打印机说明属性生成的 PDC。
  4. 将 LocalPcPt/LocalPdc.xml 与ServiceAttributes.txt或ServicePdc.xml进行比较,以确定转换或删除的功能。
  5. 如果正在删除功能,请参阅 “打印机选项不可用”或所选打印机选项不会反映在打印输出中。