This file is indexed.

/usr/share/cups/doc-root/help/api-ppd.html is in cups-server-common 1.7.2-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- SECTION: Programming -->
<head>
	<title>PPD API (DEPRECATED)	</title>
	<meta name="keywords" content="Programming">
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
}

H1, H2, H3, H4, H5, H6, P, TD, TH {
  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
}

KBD {
  font-family: monaco, courier, monospace;
  font-weight: bold;
}

PRE {
  font-family: monaco, courier, monospace;
}

PRE.command {
  border: dotted thin #7f7f7f;
  margin-left: 36pt;
  padding: 10px;
}

P.compact {
  margin: 0;
}

P.example {
  font-style: italic;
  margin-left: 36pt;
}
  
PRE.example {
  background: #eeeeee;
  border: dotted thin #999999;
  margin-left: 36pt;
  padding: 10pt;
}

PRE.command EM, PRE.example EM {
  font-family: lucida grande, geneva, helvetica, arial, sans-serif;
}

P.command {
  font-family: monaco, courier, monospace;
  margin-left: 36pt;
}

P.formula {
  font-style: italic;
  margin-left: 36pt;
}

BLOCKQUOTE {
  background: #eeeeee;
  border: solid thin #999999;
  padding: 10pt;
}

A IMG {
  border: none;
}

A:link:hover IMG {
  background: #f0f0f0;
  border-radius: 10px;
  -moz-border-radius: 10px;
}

A:link, A:visited {
  font-weight: normal;
  text-decoration: none;
}

A:link:hover, A:visited:hover, A:active {
  text-decoration: underline;
}

SUB, SUP {
  font-size: 50%;
}

TR.data, TD.data, TR.data TD {
  margin-top: 10pt;
  padding: 5pt;
  border-bottom: solid 1pt #999999;
}

TR.data TH {
  border-bottom: solid 1pt #999999;
  padding-top: 10pt;
  padding-left: 5pt;
  text-align: left;
}

DIV.table TABLE {
  border: solid thin #999999;
  border-collapse: collapse;
  border-spacing: 0;
  margin-left: auto;
  margin-right: auto;
}

DIV.table CAPTION {
  caption-side: top;
  font-size: 120%;
  font-style: italic;
  font-weight: bold;
  margin-left: auto;
  margin-right: auto;
}

DIV.table TABLE TD {
  border: solid thin #cccccc;
  padding-top: 5pt;
}

DIV.table TABLE TH {
  background: #cccccc;
  border: none;
  border-bottom: solid thin #999999;
}

DIV.figure TABLE {
  margin-left: auto;
  margin-right: auto;
}

DIV.figure CAPTION {
  caption-side: bottom;
  font-size: 120%;
  font-style: italic;
  font-weight: bold;
  margin-left: auto;
  margin-right: auto;
}

TH.label {
  text-align: right;
  vertical-align: top;
}

TH.sublabel {
  text-align: right;
  font-weight: normal;
}

HR {
  border: solid thin;
}

SPAN.info {
  background: black;
  border: thin solid black;
  color: white;
  font-size: 80%;
  font-style: italic;
  font-weight: bold;
  white-space: nowrap;
}

H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
  float: right;
  font-size: 100%;
}

H1.title {
}

H2.title, H3.title {
  border-bottom: solid 2pt #000000;
}

DIV.indent, TABLE.indent {
  margin-top: 2em;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

TABLE.indent {
  border-collapse: collapse;
}

TABLE.indent TD, TABLE.indent TH {
  padding: 0;
}

TABLE.list {
  border-collapse: collapse;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

TABLE.list TH {
  background: white;
  border-bottom: solid thin #cccccc;
  color: #444444;
  padding-top: 10pt;
  padding-left: 5pt;
  text-align: left;
  vertical-align: bottom;
  white-space: nowrap;
}

TABLE.list TH A {
  color: #4444cc;
}

TABLE.list TD {
  border-bottom: solid thin #eeeeee;
  padding-top: 5pt;
  padding-left: 5pt;
}

TABLE.list TR:nth-child(even) {
  background: #f8f8f8;
}

TABLE.list TR:nth-child(odd) {
  background: #f4f4f4;
}

DT {
  margin-left: 36pt;
  margin-top: 12pt;
}

DD {
  margin-left: 54pt;
}

DL.category DT {
  font-weight: bold;
}

P.summary {
  margin-left: 36pt;
  font-family: monaco, courier, monospace;
}

DIV.summary TABLE {
  border: solid thin #999999;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 10px;
}

DIV.summary TABLE TD, DIV.summary TABLE TH {
  border: solid thin #999999;
  padding: 5px;
  text-align: left;
  vertical-align: top;
}

DIV.summary TABLE THEAD TH {
  background: #eeeeee;
}

/* API documentation styles... */
div.body h1 {
  margin: 0;
}
div.body h2 {
  margin-top: 1.5em;
}
div.body h3, div.body h4, div.body h5 {
  margin-bottom: 0.5em;
  margin-top: 1.5em;
}
.class, .enumeration, .function, .struct, .typedef, .union {
  border-bottom: solid thin #999999;
  margin-bottom: 0;
  margin-top: 2em;
}
.description {
  margin-top: 0.5em;
}
code, p.code, pre, ul.code li {
  font-family: monaco, courier, monospace;
  font-size: 90%;
}
ul.code, ul.contents, ul.subcontents {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}
ul.code li {
  margin: 0;
}
ul.contents > li {
  margin-top: 1em;
}
ul.contents li ul.code, ul.contents li ul.subcontents {
  padding-left: 2em;
}
div.body dl {
  margin-left: 0;
  margin-top: 0;
}
div.body dt {
  font-style: italic;
  margin-left: 0;
  margin-top: 0;
}
div.body dd {
  margin-bottom: 0.5em;
}

/* This is just for the HTML files generated with the framedhelp target */
div.contents {
  background: #e8e8e8;
  border: solid thin black;
  padding: 10px;
}
div.contents h1 {
  font-size: 110%;
}
div.contents h2 {
  font-size: 100%;
}
div.contents ul.contents {
  font-size: 80%;
}
div.contents ul.subcontents li {
  margin-left: 1em;
  text-indent: -1em;
}
--></style>
</head>
<body>
<div class='body'>
<!--
  "$Id: api-ppd.header 7616 2008-05-28 00:34:13Z mike $"

  PPD API header for CUPS.

  Copyright 2008-2012 by Apple Inc.

  These coded instructions, statements, and computer programs are the
  property of Apple Inc. and are protected by Federal copyright
  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
  which should have been included with this file.  If this file is
  file is missing or damaged, see the license at "http://www.cups.org/".
-->

<h1 class='title'>PPD API (DEPRECATED)</h1>

<blockquote>The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>

<div class='summary'><table summary='General Information'>
<thead>
<tr>
	<th>Header</th>
	<th>cups/ppd.h</th>
</tr>
</thead>
<tbody>
<tr>
	<th>Library</th>
	<td>-lcups</td>
</tr>
<tr>
	<th>See Also</th>
	<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
	Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
	Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
</tr>
</tbody>
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
	<li><a href="#LOADING">Loading a PPD File</a></li>
	<li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
	<li><a href="#CONSTRAINTS">Constraints</a></li>
	<li><a href="#PAGE_SIZES">Page Sizes</a></li>
	<li><a href="#ATTRIBUTES">Attributes</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
	<li><a href="#cupsGetConflicts" title="Get a list of conflicting options in a marked PPD.">cupsGetConflicts</a></li>
	<li><a href="#cupsMarkOptions" title="Mark command-line options in a PPD file.">cupsMarkOptions</a></li>
	<li><a href="#cupsResolveConflicts" title="Resolve conflicts in a marked PPD.">cupsResolveConflicts</a></li>
	<li><a href="#ppdClose" title="Free all memory used by the PPD file.">ppdClose</a></li>
	<li><a href="#ppdCollect" title="Collect all marked options that reside in the specified
section.">ppdCollect</a></li>
	<li><a href="#ppdCollect2" title="Collect all marked options that reside in the
specified section and minimum order.">ppdCollect2</a></li>
	<li><a href="#ppdConflicts" title="Check to see if there are any conflicts among the
marked option choices.">ppdConflicts</a></li>
	<li><a href="#ppdEmit" title="Emit code for marked options to a file.">ppdEmit</a></li>
	<li><a href="#ppdEmitAfterOrder" title="Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder</a></li>
	<li><a href="#ppdEmitFd" title="Emit code for marked options to a file.">ppdEmitFd</a></li>
	<li><a href="#ppdEmitJCL" title="Emit code for JCL options to a file.">ppdEmitJCL</a></li>
	<li><a href="#ppdEmitJCLEnd" title="Emit JCLEnd code to a file.">ppdEmitJCLEnd</a></li>
	<li><a href="#ppdEmitString" title="Get a string containing the code for marked options.">ppdEmitString</a></li>
	<li><a href="#ppdErrorString" title="Returns the text assocated with a status.">ppdErrorString</a></li>
	<li><a href="#ppdFindAttr" title="Find the first matching attribute.">ppdFindAttr</a></li>
	<li><a href="#ppdFindChoice" title="Return a pointer to an option choice.">ppdFindChoice</a></li>
	<li><a href="#ppdFindCustomOption" title="Find a custom option.">ppdFindCustomOption</a></li>
	<li><a href="#ppdFindCustomParam" title="Find a parameter for a custom option.">ppdFindCustomParam</a></li>
	<li><a href="#ppdFindMarkedChoice" title="Return the marked choice for the specified option.">ppdFindMarkedChoice</a></li>
	<li><a href="#ppdFindNextAttr" title="Find the next matching attribute.">ppdFindNextAttr</a></li>
	<li><a href="#ppdFindOption" title="Return a pointer to the specified option.">ppdFindOption</a></li>
	<li><a href="#ppdFirstCustomParam" title="Return the first parameter for a custom option.">ppdFirstCustomParam</a></li>
	<li><a href="#ppdFirstOption" title="Return the first option in the PPD file.">ppdFirstOption</a></li>
	<li><a href="#ppdInstallableConflict" title="Test whether an option choice conflicts with
an installable option.">ppdInstallableConflict</a></li>
	<li><a href="#ppdIsMarked" title="Check to see if an option is marked.">ppdIsMarked</a></li>
	<li><a href="#ppdLastError" title="Return the status from the last ppdOpen*().">ppdLastError</a></li>
	<li><a href="#ppdLocalize" title="Localize the PPD file to the current locale.">ppdLocalize</a></li>
	<li><a href="#ppdLocalizeAttr" title="Localize an attribute.">ppdLocalizeAttr</a></li>
	<li><a href="#ppdLocalizeIPPReason" title="Get the localized version of a cupsIPPReason
attribute.">ppdLocalizeIPPReason</a></li>
	<li><a href="#ppdLocalizeMarkerName" title="Get the localized version of a marker-names
attribute value.">ppdLocalizeMarkerName</a></li>
	<li><a href="#ppdMarkDefaults" title="Mark all default options in the PPD file.">ppdMarkDefaults</a></li>
	<li><a href="#ppdMarkOption" title="Mark an option in a PPD file and return the number of
conflicts.">ppdMarkOption</a></li>
	<li><a href="#ppdNextCustomParam" title="Return the next parameter for a custom option.">ppdNextCustomParam</a></li>
	<li><a href="#ppdNextOption" title="Return the next option in the PPD file.">ppdNextOption</a></li>
	<li><a href="#ppdOpen" title="Read a PPD file into memory.">ppdOpen</a></li>
	<li><a href="#ppdOpen2" title="Read a PPD file into memory.">ppdOpen2</a></li>
	<li><a href="#ppdOpenFd" title="Read a PPD file into memory.">ppdOpenFd</a></li>
	<li><a href="#ppdOpenFile" title="Read a PPD file into memory.">ppdOpenFile</a></li>
	<li><a href="#ppdPageLength" title="Get the page length for the given size.">ppdPageLength</a></li>
	<li><a href="#ppdPageSize" title="Get the page size record for the named size.">ppdPageSize</a></li>
	<li><a href="#ppdPageSizeLimits" title="Return the custom page size limits.">ppdPageSizeLimits</a></li>
	<li><a href="#ppdPageWidth" title="Get the page width for the given size.">ppdPageWidth</a></li>
	<li><a href="#ppdSetConformance" title="Set the conformance level for PPD files.">ppdSetConformance</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
	<li><a href="#ppd_attr_t" title="PPD Attribute Structure ">ppd_attr_t</a></li>
	<li><a href="#ppd_choice_t" title="Option choices">ppd_choice_t</a></li>
	<li><a href="#ppd_conform_t" title="Conformance Levels ">ppd_conform_t</a></li>
	<li><a href="#ppd_const_t" title="Constraints">ppd_const_t</a></li>
	<li><a href="#ppd_coption_t" title="Custom Option ">ppd_coption_t</a></li>
	<li><a href="#ppd_cparam_t" title="Custom Parameter ">ppd_cparam_t</a></li>
	<li><a href="#ppd_cplimit_t" title="Custom Parameter Limit ">ppd_cplimit_t</a></li>
	<li><a href="#ppd_cptype_t" title="Custom Parameter Type ">ppd_cptype_t</a></li>
	<li><a href="#ppd_cpvalue_t" title="Custom Parameter Value ">ppd_cpvalue_t</a></li>
	<li><a href="#ppd_cs_t" title="Colorspaces">ppd_cs_t</a></li>
	<li><a href="#ppd_emul_t" title="Emulators">ppd_emul_t</a></li>
	<li><a href="#ppd_file_t" title="PPD File">ppd_file_t</a></li>
	<li><a href="#ppd_group_t" title="Groups">ppd_group_t</a></li>
	<li><a href="#ppd_option_t" title="Options">ppd_option_t</a></li>
	<li><a href="#ppd_profile_t" title="sRGB Color Profiles">ppd_profile_t</a></li>
	<li><a href="#ppd_section_t" title="Order dependency sections">ppd_section_t</a></li>
	<li><a href="#ppd_size_t" title="Page Sizes">ppd_size_t</a></li>
	<li><a href="#ppd_status_t" title="Status Codes ">ppd_status_t</a></li>
	<li><a href="#ppd_ui_t" title="UI Types">ppd_ui_t</a></li>
</ul></li>
<li><a href="#STRUCTURES">Structures</a><ul class="code">
	<li><a href="#ppd_attr_s" title="PPD Attribute Structure ">ppd_attr_s</a></li>
	<li><a href="#ppd_choice_s" title="Option choices">ppd_choice_s</a></li>
	<li><a href="#ppd_const_s" title="Constraints">ppd_const_s</a></li>
	<li><a href="#ppd_coption_s" title="Custom Option ">ppd_coption_s</a></li>
	<li><a href="#ppd_cparam_s" title="Custom Parameter ">ppd_cparam_s</a></li>
	<li><a href="#ppd_emul_s" title="Emulators">ppd_emul_s</a></li>
	<li><a href="#ppd_file_s" title="PPD File">ppd_file_s</a></li>
	<li><a href="#ppd_group_s" title="Groups">ppd_group_s</a></li>
	<li><a href="#ppd_option_s" title="Options">ppd_option_s</a></li>
	<li><a href="#ppd_profile_s" title="sRGB Color Profiles">ppd_profile_s</a></li>
	<li><a href="#ppd_size_s" title="Page Sizes">ppd_size_s</a></li>
</ul></li>
<li><a href="#UNIONS">Unions</a><ul class="code">
	<li><a href="#ppd_cplimit_u" title="Custom Parameter Limit ">ppd_cplimit_u</a></li>
	<li><a href="#ppd_cpvalue_u" title="Custom Parameter Value ">ppd_cpvalue_u</a></li>
</ul></li>
<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
	<li><a href="#ppd_conform_e" title="Conformance Levels ">ppd_conform_e</a></li>
	<li><a href="#ppd_cs_e" title="Colorspaces">ppd_cs_e</a></li>
	<li><a href="#ppd_section_e" title="Order dependency sections">ppd_section_e</a></li>
	<li><a href="#ppd_status_e" title="Status Codes ">ppd_status_e</a></li>
	<li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
</ul></li>
</ul>
<!--
  "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"

  PPD API introduction for CUPS.

  Copyright 2007-2012 by Apple Inc.
  Copyright 1997-2006 by Easy Software Products, all rights reserved.

  These coded instructions, statements, and computer programs are the
  property of Apple Inc. and are protected by Federal copyright
  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
  which should have been included with this file.  If this file is
  file is missing or damaged, see the license at "http://www.cups.org/".
-->

<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>

<blockquote>The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>

<p>The CUPS PPD API provides read-only access the data in PostScript Printer
Description ("PPD") files which are used for all printers with a driver. With
it you can obtain the data necessary to display printer options to users, mark
option choices and check for conflicting choices, and output marked choices in
PostScript output. The <a href="#ppd_file_t"><code>ppd_file_t</code></a>
structure contains all of the information in a PPD file.</p>

<blockquote><b>Note:</b>

<p>The CUPS PPD API uses the terms "option" and "choice" instead of the Adobe
terms "MainKeyword" and "OptionKeyword" to refer to specific printer options and
features. CUPS also treats option ("MainKeyword") and choice ("OptionKeyword")
values as case-insensitive strings, so option "InputSlot" and choice "Upper"
are equivalent to "inputslot" and "upper", respectively.</p>
</blockquote>

<h3><a name="LOADING">Loading a PPD File</a></h3>

<p>The <a href="#ppdOpenFile"><code>ppdOpenFile</code></a> function "opens" a
PPD file and loads it into memory. For example, the following code opens the
current printer's PPD file in a CUPS filter:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD"));
</pre>

<p>The return value is a pointer to a new
<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure or <code>NULL</code>
if the PPD file does not exist or cannot be loaded. The
<a href="#ppdClose"><code>ppdClose</code></a> function frees the memory used
by the structure:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;

<a href="#ppdClose">ppdClose</a>(ppd);
</pre>

<p>Once closed, pointers to the <a href="#ppd_file_t"><code>ppd_file_t</code></a>
structure and any data in it will no longer be valid.</p>

<h3><a name="OPTIONS_AND_GROUPS">Options and Groups</a></h3>

<p>PPD files support multiple options, which are stored in arrays of
<a href="#ppd_option_t"><code>ppd_option_t</code></a> and
<a href="#ppd_choice_t"><code>ppd_choice_t</code></a> structures.</p>

<p>Each option in turn is associated with a group stored in a
<a href="#ppd_group_t"><code>ppd_group_t</code></a> structure. Groups can be
specified in the PPD file; if an option is not associated with a group
then it is put in an automatically-generated "General" group. Groups can also
have sub-groups, however CUPS currently ignores sub-groups because of past
abuses of this functionality.</p>

<p>Option choices are selected by marking them using one of three functions. The
first is <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> which
selects all of the default options in the PPD file:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;

<a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
</pre>

<p>The second is <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>
which selects a single option choice in the PPD file. For example, the following
code selects the upper paper tray:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;

<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "Upper");
</pre>

<p>The last function is
<a href="#cupsMarkOptions"><code>cupsMarkOptions</code></a> which selects
multiple option choices in the PPD file from an array of CUPS options, mapping
IPP attributes like "media" and "sides" to their corresponding PPD options. You
typically use this function in a print filter with
<code>cupsParseOptions</code> and
<a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> to select all of
the option choices needed for the job, for example:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD"));
cups_option_t *options = NULL;
int num_options = cupsParseOptions(argv[5], 0, &amp;options);

<a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
<a href="#cupsMarkOptions">cupsMarkOptions</a>(ppd, num_options, options);
cupsFreeOptions(num_options, options);
</pre>

<h3><a name="CONSTRAINTS">Constraints</a></h3>

<p>PPD files support specification of conflict conditions, called
constraints, between different options. Constraints are stored in an array of
<a href="#ppd_const_t"><code>ppd_const_t</code></a> structures which specify
the options and choices that conflict with each other. The
<a href="#ppdConflicts"><code>ppdConflicts</code></a> function tells you
how many of the selected options are incompatible. Since constraints are
normally specified in pairs, the returned value is typically an even number.</p>

<h3><a name="PAGE_SIZES">Page Sizes</a></h3>

<p>Page sizes are special options which have physical dimensions and margins
associated with them. The size information is stored in
<a href="#ppd_size_t"><code>ppd_size_t</code></a> structures and is available
by looking up the named size with the
<a href="#ppdPageSize"><code>ppdPageSize</code></a> function. The page size and
margins are returned in units called points; there are 72 points per inch. If
you pass <code>NULL</code> for the size, the currently selected size is
returned:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;
<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, NULL);
</pre>

<p>Besides the standard page sizes listed in a PPD file, some printers
support variable or custom page sizes. Custom page sizes are supported if the
<code>variables_sizes</code> member of the
<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure is non-zero.
The <code>custom_min</code>, <code>custom_max</code>, and
<code>custom_margins</code> members of the
<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure define the limits
of the printable area. To get the resulting media size, use a page size string
of the form "Custom.<I>width</I>x<I>length</I>", where "width" and "length" are
in points. Custom page size names can also be specified in inches
("Custom.<i>width</i>x<i>height</i>in"), centimeters
("Custom.<i>width</i>x<i>height</i>cm"), or millimeters
("Custom.<i>width</i>x<i>height</i>mm"):</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;

/* Get an 576x720 point custom page size */
<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.576x720");

/* Get an 8x10 inch custom page size */
<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.8x10in");

/* Get a 100x200 millimeter custom page size */
<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.100x200mm");

/* Get a 12.7x34.5 centimeter custom page size */
<a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.12.7x34.5cm");
</pre>

<p>If the PPD does not support variable page sizes, the
<a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return
<code>NULL</code>.</p>

<h3><a name="ATTRIBUTES">Attributes</a></h3>

<p>Every PPD file is composed of one or more attributes. Most of these
attributes are used to define groups, options, choices, and page sizes,
however several informational attributes may be present which you can access
in your program or filter. Attributes normally look like one of the following
examples in a PPD file:</p>

<pre class="example">
*name: "value"
*name spec: "value"
*name spec/text: "value"
</pre>

<p>The <a href="#ppdFindAttr"><code>ppdFindAttr</code></a> and
<a href="#ppdFindNextAttr"><code>ppdFindNextAttr</code></a> functions find the
first and next instances, respectively, of the named attribute with the given
"spec" string and return a <a href="#ppd_attr_t"><code>ppd_attr_t</code></a>
structure. If you provide a NULL specifier string, all attributes with the
given name will be returned. For example, the following code lists all of the
<code>Product</code> attributes in a PPD file:</p>

<pre class="example">
#include &lt;cups/ppd.h&gt;

<a href="#ppd_file_t">ppd_file_t</a> *ppd;
<a href="#ppd_attr_t">ppd_attr_t</a> *attr;

for (attr = <a href="#ppdFindAttr">ppdFindAttr</a>(ppd, "Product", NULL);
     attr != NULL;
     attr = <a href="#ppdFindNextAttr">ppdFindNextAttr</a>(ppd, "Product", NULL))
  puts(attr->value);
</pre>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsGetConflicts">cupsGetConflicts</a></h3>
<p class="description">Get a list of conflicting options in a marked PPD.</p>
<p class="code">
int cupsGetConflicts (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice,<br>
&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t **options<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>option</dt>
<dd class="description">Option to test</dd>
<dt>choice</dt>
<dd class="description">Choice to test</dd>
<dt>options</dt>
<dd class="description">Conflicting options</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of conflicting options</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function gets a list of options that would conflict if &quot;option&quot; and
&quot;choice&quot; were marked in the PPD.  You would typically call this function
after marking the currently selected options in the PPD in order to
determine whether a new option selection would cause a conflict.<br>
<br>
The number of conflicting options are returned with &quot;options&quot; pointing to
the conflicting options.  The returned option array must be freed using
<a href="#cupsFreeOptions"><code>cupsFreeOptions</code></a>.

</p>
<h3 class="function"><a name="cupsMarkOptions">cupsMarkOptions</a></h3>
<p class="description">Mark command-line options in a PPD file.</p>
<p class="code">
int cupsMarkOptions (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>num_options</dt>
<dd class="description">Number of options</dd>
<dt>options</dt>
<dd class="description">Options</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 if conflicts exist, 0 otherwise</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function maps the IPP &quot;finishings&quot;, &quot;media&quot;, &quot;mirror&quot;,
&quot;multiple-document-handling&quot;, &quot;output-bin&quot;, &quot;print-color-mode&quot;,
&quot;print-quality&quot;, &quot;printer-resolution&quot;, and &quot;sides&quot; attributes to their
corresponding PPD options and choices.</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3>
<p class="description">Resolve conflicts in a marked PPD.</p>
<p class="code">
int cupsResolveConflicts (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice,<br>
&nbsp;&nbsp;&nbsp;&nbsp;int *num_options,<br>
&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t **options<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>option</dt>
<dd class="description">Newly selected option or <code>NULL</code> for none</dd>
<dt>choice</dt>
<dd class="description">Newly selected choice or <code>NULL</code> for none</dd>
<dt>num_options</dt>
<dd class="description">Number of additional selected options</dd>
<dt>options</dt>
<dd class="description">Additional selected options</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 on success, 0 on failure</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function attempts to resolve any conflicts in a marked PPD, returning
a list of option changes that are required to resolve them.  On input,
&quot;num_options&quot; and &quot;options&quot; contain any pending option changes that have
not yet been marked, while &quot;option&quot; and &quot;choice&quot; contain the most recent
selection which may or may not be in &quot;num_options&quot; or &quot;options&quot;.<br>
<br>
On successful return, &quot;num_options&quot; and &quot;options&quot; are updated to contain
&quot;option&quot; and &quot;choice&quot; along with any changes required to resolve conflicts
specified in the PPD file and 1 is returned.<br>
<br>
If option conflicts cannot be resolved, &quot;num_options&quot; and &quot;options&quot; are not
changed and 0 is returned.<br>
<br>
When resolving conflicts, <code>cupsResolveConflicts</code> does not consider
changes to the current page size (<code>media</code>, <code>PageSize</code>, and
<code>PageRegion</code>) or to the most recent option specified in &quot;option&quot;.
Thus, if the only way to resolve a conflict is to change the page size
or the option the user most recently changed, <code>cupsResolveConflicts</code>
will return 0 to indicate it was unable to resolve the conflicts.<br>
<br>
The <code>cupsResolveConflicts</code> function uses one of two sources of option
constraint information.  The preferred constraint information is defined by
<code>cupsUIConstraints</code> and <code>cupsUIResolver</code> attributes - in this
case, the PPD file provides constraint resolution actions.<br>
<br>
The backup constraint information is defined by the
<code>UIConstraints</code> and <code>NonUIConstraints</code> attributes.  These
constraints are resolved algorithmically by first selecting the default
choice for the conflicting option, then iterating over all possible choices
until a non-conflicting option choice is found.

</p>
<h3 class="function"><a name="ppdClose">ppdClose</a></h3>
<p class="description">Free all memory used by the PPD file.</p>
<p class="code">
void ppdClose (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
</dl>
<h3 class="function"><a name="ppdCollect">ppdCollect</a></h3>
<p class="description">Collect all marked options that reside in the specified
section.</p>
<p class="code">
int ppdCollect (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>section</dt>
<dd class="description">Section to collect</dd>
<dt>choices</dt>
<dd class="description">Pointers to choices</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of options marked</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The choices array should be freed using <code>free</code> when you are
finished with it.</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdCollect2">ppdCollect2</a></h3>
<p class="description">Collect all marked options that reside in the
specified section and minimum order.</p>
<p class="code">
int ppdCollect2 (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
&nbsp;&nbsp;&nbsp;&nbsp;float min_order,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>section</dt>
<dd class="description">Section to collect</dd>
<dt>min_order</dt>
<dd class="description">Minimum OrderDependency value</dd>
<dt>choices</dt>
<dd class="description">Pointers to choices</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of options marked</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The choices array should be freed using <code>free</code> when you are
finished with it.

</p>
<h3 class="function"><a name="ppdConflicts">ppdConflicts</a></h3>
<p class="description">Check to see if there are any conflicts among the
marked option choices.</p>
<p class="code">
int ppdConflicts (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD to check</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of conflicts found</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The returned value is the same as returned by <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>.</p>
<h3 class="function"><a name="ppdEmit">ppdEmit</a></h3>
<p class="description">Emit code for marked options to a file.</p>
<p class="code">
int ppdEmit (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>fp</dt>
<dd class="description">File to write to</dd>
<dt>section</dt>
<dd class="description">Section to write</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on failure</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
<p class="description">Emit a subset of the code for marked options to a file.</p>
<p class="code">
int ppdEmitAfterOrder (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
&nbsp;&nbsp;&nbsp;&nbsp;int limit,<br>
&nbsp;&nbsp;&nbsp;&nbsp;float min_order<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>fp</dt>
<dd class="description">File to write to</dd>
<dt>section</dt>
<dd class="description">Section to write</dd>
<dt>limit</dt>
<dd class="description">Non-zero to use min_order</dd>
<dt>min_order</dt>
<dd class="description">Lowest OrderDependency</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on failure</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">When &quot;limit&quot; is non-zero, this function only emits options whose
OrderDependency value is greater than or equal to &quot;min_order&quot;.<br>
<br>
When &quot;limit&quot; is zero, this function is identical to ppdEmit().

</p>
<h3 class="function"><a name="ppdEmitFd">ppdEmitFd</a></h3>
<p class="description">Emit code for marked options to a file.</p>
<p class="code">
int ppdEmitFd (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>fd</dt>
<dd class="description">File to write to</dd>
<dt>section</dt>
<dd class="description">Section to write</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on failure</p>
<h3 class="function"><a name="ppdEmitJCL">ppdEmitJCL</a></h3>
<p class="description">Emit code for JCL options to a file.</p>
<p class="code">
int ppdEmitJCL (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp,<br>
&nbsp;&nbsp;&nbsp;&nbsp;int job_id,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *user,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *title<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>fp</dt>
<dd class="description">File to write to</dd>
<dt>job_id</dt>
<dd class="description">Job ID</dd>
<dt>user</dt>
<dd class="description">Username</dd>
<dt>title</dt>
<dd class="description">Title</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on failure</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
<p class="description">Emit JCLEnd code to a file.</p>
<p class="code">
int ppdEmitJCLEnd (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>fp</dt>
<dd class="description">File to write to</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on failure</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdEmitString">ppdEmitString</a></h3>
<p class="description">Get a string containing the code for marked options.</p>
<p class="code">
char *ppdEmitString (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section,<br>
&nbsp;&nbsp;&nbsp;&nbsp;float min_order<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>section</dt>
<dd class="description">Section to write</dd>
<dt>min_order</dt>
<dd class="description">Lowest OrderDependency</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">String containing option code or <code>NULL</code> if there is no option code</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">When &quot;min_order&quot; is greater than zero, this function only includes options
whose OrderDependency value is greater than or equal to &quot;min_order&quot;.
Otherwise, all options in the specified section are included in the
returned string.<br>
<br>
The return string is allocated on the heap and should be freed using
<code>free</code> when you are done with it.

</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppdErrorString">ppdErrorString</a></h3>
<p class="description">Returns the text assocated with a status.</p>
<p class="code">
const char *ppdErrorString (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_status_t">ppd_status_t</a> status<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>status</dt>
<dd class="description">PPD status</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Status string</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppdFindAttr">ppdFindAttr</a></h3>
<p class="description">Find the first matching attribute.</p>
<p class="code">
<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindAttr (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>name</dt>
<dd class="description">Attribute name</dd>
<dt>spec</dt>
<dd class="description">Specifier string or <code>NULL</code></dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Attribute or <code>NULL</code> if not found</p>
<h3 class="function"><a name="ppdFindChoice">ppdFindChoice</a></h3>
<p class="description">Return a pointer to an option choice.</p>
<p class="code">
<a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindChoice (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *o,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>o</dt>
<dd class="description">Pointer to option</dd>
<dt>choice</dt>
<dd class="description">Name of choice</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Choice pointer or <code>NULL</code></p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
<p class="description">Find a custom option.</p>
<p class="code">
<a href="#ppd_coption_t">ppd_coption_t</a> *ppdFindCustomOption (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *keyword<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>keyword</dt>
<dd class="description">Custom option name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Custom option or NULL</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
<p class="description">Find a parameter for a custom option.</p>
<p class="code">
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFindCustomParam (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>opt</dt>
<dd class="description">Custom option</dd>
<dt>name</dt>
<dd class="description">Parameter name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Custom parameter or NULL</p>
<h3 class="function"><a name="ppdFindMarkedChoice">ppdFindMarkedChoice</a></h3>
<p class="description">Return the marked choice for the specified option.</p>
<p class="code">
<a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindMarkedChoice (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>option</dt>
<dd class="description">Keyword/option name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Pointer to choice or <code>NULL</code></p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
<p class="description">Find the next matching attribute.</p>
<p class="code">
<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindNextAttr (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>name</dt>
<dd class="description">Attribute name</dd>
<dt>spec</dt>
<dd class="description">Specifier string or <code>NULL</code></dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Attribute or <code>NULL</code> if not found</p>
<h3 class="function"><a name="ppdFindOption">ppdFindOption</a></h3>
<p class="description">Return a pointer to the specified option.</p>
<p class="code">
<a href="#ppd_option_t">ppd_option_t</a> *ppdFindOption (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>option</dt>
<dd class="description">Option/Keyword name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Pointer to option or <code>NULL</code></p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
<p class="description">Return the first parameter for a custom option.</p>
<p class="code">
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFirstCustomParam (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>opt</dt>
<dd class="description">Custom option</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Custom parameter or NULL</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdFirstOption">ppdFirstOption</a></h3>
<p class="description">Return the first option in the PPD file.</p>
<p class="code">
<a href="#ppd_option_t">ppd_option_t</a> *ppdFirstOption (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">First option or <code>NULL</code></p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">Options are returned from all groups in ascending alphanumeric order.

</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3>
<p class="description">Test whether an option choice conflicts with
an installable option.</p>
<p class="code">
int ppdInstallableConflict (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>option</dt>
<dd class="description">Option</dd>
<dt>choice</dt>
<dd class="description">Choice</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 if conflicting, 0 if not conflicting</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function tests whether a particular option choice is available based
on constraints against options in the &quot;InstallableOptions&quot; group.

</p>
<h3 class="function"><a name="ppdIsMarked">ppdIsMarked</a></h3>
<p class="description">Check to see if an option is marked.</p>
<p class="code">
int ppdIsMarked (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file data</dd>
<dt>option</dt>
<dd class="description">Option/Keyword name</dd>
<dt>choice</dt>
<dd class="description">Choice name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Non-zero if option is marked</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppdLastError">ppdLastError</a></h3>
<p class="description">Return the status from the last ppdOpen*().</p>
<p class="code">
<a href="#ppd_status_t">ppd_status_t</a> ppdLastError (<br>
&nbsp;&nbsp;&nbsp;&nbsp;int *line<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>line</dt>
<dd class="description">Line number</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Status code</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdLocalize">ppdLocalize</a></h3>
<p class="description">Localize the PPD file to the current locale.</p>
<p class="code">
int ppdLocalize (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on error</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">All groups, options, and choices are localized, as are ICC profile
descriptions, printer presets, and custom option parameters.  Each
localized string uses the UTF-8 character encoding.

</p>
<h3 class="function"><a name="ppdLocalizeAttr">ppdLocalizeAttr</a></h3>
<p class="description">Localize an attribute.</p>
<p class="code">
<a href="#ppd_attr_t">ppd_attr_t</a> *ppdLocalizeAttr (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *keyword,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *spec<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>keyword</dt>
<dd class="description">Main keyword</dd>
<dt>spec</dt>
<dd class="description">Option keyword or <code>NULL</code> for none</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Localized attribute or <code>NULL</code> if none exists</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function uses the current locale to find the localized attribute for
the given main and option keywords.  If no localized version of the
attribute exists for the current locale, the unlocalized version is returned.</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
<p class="description">Get the localized version of a cupsIPPReason
attribute.</p>
<p class="code">
const char *ppdLocalizeIPPReason (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *reason,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
&nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>reason</dt>
<dd class="description">IPP reason keyword to look up</dd>
<dt>scheme</dt>
<dd class="description">URI scheme or NULL for text</dd>
<dt>buffer</dt>
<dd class="description">Value buffer</dd>
<dt>bufsize</dt>
<dd class="description">Size of value buffer</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Value or NULL if not found</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function uses the current locale to find the corresponding reason
text or URI from the attribute value. If &quot;scheme&quot; is NULL or &quot;text&quot;,
the returned value contains human-readable (UTF-8) text from the translation
string or attribute value. Otherwise the corresponding URI is returned.<br>
<br>
If no value of the requested scheme can be found, NULL is returned.

</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
<p class="description">Get the localized version of a marker-names
attribute value.</p>
<p class="code">
const char *ppdLocalizeMarkerName (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>name</dt>
<dd class="description">Marker name to look up</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Value or <code>NULL</code> if not found</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function uses the current locale to find the corresponding name
text from the attribute value. If no localized text for the requested
name can be found, <code>NULL</code> is returned.

</p>
<h3 class="function"><a name="ppdMarkDefaults">ppdMarkDefaults</a></h3>
<p class="description">Mark all default options in the PPD file.</p>
<p class="code">
void ppdMarkDefaults (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
</dl>
<h3 class="function"><a name="ppdMarkOption">ppdMarkOption</a></h3>
<p class="description">Mark an option in a PPD file and return the number of
conflicts.</p>
<p class="code">
int ppdMarkOption (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *choice<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>option</dt>
<dd class="description">Keyword</dd>
<dt>choice</dt>
<dd class="description">Option name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of conflicts</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
<p class="description">Return the next parameter for a custom option.</p>
<p class="code">
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdNextCustomParam (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_coption_t">ppd_coption_t</a> *opt<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>opt</dt>
<dd class="description">Custom option</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Custom parameter or NULL</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdNextOption">ppdNextOption</a></h3>
<p class="description">Return the next option in the PPD file.</p>
<p class="code">
<a href="#ppd_option_t">ppd_option_t</a> *ppdNextOption (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Next option or <code>NULL</code></p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">Options are returned from all groups in ascending alphanumeric order.

</p>
<h3 class="function"><a name="ppdOpen">ppdOpen</a></h3>
<p class="description">Read a PPD file into memory.</p>
<p class="code">
<a href="#ppd_file_t">ppd_file_t</a> *ppdOpen (<br>
&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>fp</dt>
<dd class="description">File to read from</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">PPD file record</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppdOpen2">ppdOpen2</a></h3>
<p class="description">Read a PPD file into memory.</p>
<p class="code">
<a href="#ppd_file_t">ppd_file_t</a> *ppdOpen2 (<br>
&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *fp<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>fp</dt>
<dd class="description">File to read from</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
<h3 class="function"><a name="ppdOpenFd">ppdOpenFd</a></h3>
<p class="description">Read a PPD file into memory.</p>
<p class="code">
<a href="#ppd_file_t">ppd_file_t</a> *ppdOpenFd (<br>
&nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>fd</dt>
<dd class="description">File to read from</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
<h3 class="function"><a name="ppdOpenFile">ppdOpenFile</a></h3>
<p class="description">Read a PPD file into memory.</p>
<p class="code">
<a href="#ppd_file_t">ppd_file_t</a> *ppdOpenFile (<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>filename</dt>
<dd class="description">File to read from</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">PPD file record or <code>NULL</code> if the PPD file could not be opened.</p>
<h3 class="function"><a name="ppdPageLength">ppdPageLength</a></h3>
<p class="description">Get the page length for the given size.</p>
<p class="code">
float ppdPageLength (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file</dd>
<dt>name</dt>
<dd class="description">Size name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Length of page in points or 0.0</p>
<h3 class="function"><a name="ppdPageSize">ppdPageSize</a></h3>
<p class="description">Get the page size record for the named size.</p>
<p class="code">
<a href="#ppd_size_t">ppd_size_t</a> *ppdPageSize (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>name</dt>
<dd class="description">Size name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Size record for page or NULL</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3>
<p class="description">Return the custom page size limits.</p>
<p class="code">
int ppdPageSizeLimits (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_size_t">ppd_size_t</a> *minimum,<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_size_t">ppd_size_t</a> *maximum<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>minimum</dt>
<dd class="description">Minimum custom size</dd>
<dt>maximum</dt>
<dd class="description">Maximum custom size</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 if custom sizes are supported, 0 otherwise</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function returns the minimum and maximum custom page sizes and printable
areas based on the currently-marked (selected) options.<br>
<br>
If the specified PPD file does not support custom page sizes, both
&quot;minimum&quot; and &quot;maximum&quot; are filled with zeroes.

</p>
<h3 class="function"><a name="ppdPageWidth">ppdPageWidth</a></h3>
<p class="description">Get the page width for the given size.</p>
<p class="code">
float ppdPageWidth (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_file_t">ppd_file_t</a> *ppd,<br>
&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>ppd</dt>
<dd class="description">PPD file record</dd>
<dt>name</dt>
<dd class="description">Size name</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Width of page in points or 0.0</p>
<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="ppdSetConformance">ppdSetConformance</a></h3>
<p class="description">Set the conformance level for PPD files.</p>
<p class="code">
void ppdSetConformance (<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_conform_t">ppd_conform_t</a> c<br>
);</p>
<h4 class="parameters">Parameters</h4>
<dl>
<dt>c</dt>
<dd class="description">Conformance level</dd>
</dl>
<h2 class="title"><a name="TYPES">Data Types</a></h2>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_attr_t">ppd_attr_t</a></h3>
<p class="description">PPD Attribute Structure </p>
<p class="code">
typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
</p>
<h3 class="typedef"><a name="ppd_choice_t">ppd_choice_t</a></h3>
<p class="description">Option choices</p>
<p class="code">
typedef struct <a href="#ppd_choice_s">ppd_choice_s</a> ppd_choice_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_conform_t">ppd_conform_t</a></h3>
<p class="description">Conformance Levels </p>
<p class="code">
typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
</p>
<h3 class="typedef"><a name="ppd_const_t">ppd_const_t</a></h3>
<p class="description">Constraints</p>
<p class="code">
typedef struct <a href="#ppd_const_s">ppd_const_s</a> ppd_const_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_coption_t">ppd_coption_t</a></h3>
<p class="description">Custom Option </p>
<p class="code">
typedef struct <a href="#ppd_coption_s">ppd_coption_s</a> ppd_coption_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
<p class="description">Custom Parameter </p>
<p class="code">
typedef struct <a href="#ppd_cparam_s">ppd_cparam_s</a> ppd_cparam_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
<p class="description">Custom Parameter Limit </p>
<p class="code">
typedef union <a href="#ppd_cplimit_u">ppd_cplimit_u</a> ppd_cplimit_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
<p class="description">Custom Parameter Type </p>
<p class="code">
typedef enum ppd_cptype_e ppd_cptype_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
<p class="description">Custom Parameter Value </p>
<p class="code">
typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t;
</p>
<h3 class="typedef"><a name="ppd_cs_t">ppd_cs_t</a></h3>
<p class="description">Colorspaces</p>
<p class="code">
typedef enum <a href="#ppd_cs_e">ppd_cs_e</a> ppd_cs_t;
</p>
<h3 class="typedef"><a name="ppd_emul_t">ppd_emul_t</a></h3>
<p class="description">Emulators</p>
<p class="code">
typedef struct <a href="#ppd_emul_s">ppd_emul_s</a> ppd_emul_t;
</p>
<h3 class="typedef"><a name="ppd_file_t">ppd_file_t</a></h3>
<p class="description">PPD File</p>
<p class="code">
typedef struct <a href="#ppd_file_s">ppd_file_s</a> ppd_file_t;
</p>
<h3 class="typedef"><a name="ppd_group_t">ppd_group_t</a></h3>
<p class="description">Groups</p>
<p class="code">
typedef struct <a href="#ppd_group_s">ppd_group_s</a> ppd_group_t;
</p>
<h3 class="typedef"><a name="ppd_option_t">ppd_option_t</a></h3>
<p class="description">Options</p>
<p class="code">
typedef struct <a href="#ppd_option_s">ppd_option_s</a> ppd_option_t;
</p>
<h3 class="typedef"><a name="ppd_profile_t">ppd_profile_t</a></h3>
<p class="description">sRGB Color Profiles</p>
<p class="code">
typedef struct <a href="#ppd_profile_s">ppd_profile_s</a> ppd_profile_t;
</p>
<h3 class="typedef"><a name="ppd_section_t">ppd_section_t</a></h3>
<p class="description">Order dependency sections</p>
<p class="code">
typedef enum <a href="#ppd_section_e">ppd_section_e</a> ppd_section_t;
</p>
<h3 class="typedef"><a name="ppd_size_t">ppd_size_t</a></h3>
<p class="description">Page Sizes</p>
<p class="code">
typedef struct <a href="#ppd_size_s">ppd_size_s</a> ppd_size_t;
</p>
<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_status_t">ppd_status_t</a></h3>
<p class="description">Status Codes </p>
<p class="code">
typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t;
</p>
<h3 class="typedef"><a name="ppd_ui_t">ppd_ui_t</a></h3>
<p class="description">UI Types</p>
<p class="code">
typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
</p>
<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
<h3 class="struct"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_attr_s">ppd_attr_s</a></h3>
<p class="description">PPD Attribute Structure </p>
<p class="code">struct ppd_attr_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char spec[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *value;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>name[PPD_MAX_NAME] </dt>
<dd class="description">Name of attribute (cupsXYZ)</dd>
<dt>spec[PPD_MAX_NAME] </dt>
<dd class="description">Specifier string, if any</dd>
<dt>text[PPD_MAX_TEXT] </dt>
<dd class="description">Human-readable text, if any</dd>
<dt>value </dt>
<dd class="description">Value string</dd>
</dl>
<h3 class="struct"><a name="ppd_choice_s">ppd_choice_s</a></h3>
<p class="description">Option choices</p>
<p class="code">struct ppd_choice_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char choice[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *code;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char marked;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *option;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>choice[PPD_MAX_NAME] </dt>
<dd class="description">Computer-readable option name</dd>
<dt>code </dt>
<dd class="description">Code to send for this option</dd>
<dt>marked </dt>
<dd class="description">0 if not selected, 1 otherwise</dd>
<dt>option </dt>
<dd class="description">Pointer to parent option structure</dd>
<dt>text[PPD_MAX_TEXT] </dt>
<dd class="description">Human-readable option name</dd>
</dl>
<h3 class="struct"><a name="ppd_const_s">ppd_const_s</a></h3>
<p class="description">Constraints</p>
<p class="code">struct ppd_const_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char choice1[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char choice2[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char option1[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char option2[PPD_MAX_NAME];<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>choice1[PPD_MAX_NAME] </dt>
<dd class="description">First option/choice (blank for all)</dd>
<dt>choice2[PPD_MAX_NAME] </dt>
<dd class="description">Second option/choice (blank for all)</dd>
<dt>option1[PPD_MAX_NAME] </dt>
<dd class="description">First keyword</dd>
<dt>option2[PPD_MAX_NAME] </dt>
<dd class="description">Second keyword</dd>
</dl>
<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_coption_s">ppd_coption_s</a></h3>
<p class="description">Custom Option </p>
<p class="code">struct ppd_coption_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;int marked;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *option;<br>
&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *params;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>keyword[PPD_MAX_NAME] </dt>
<dd class="description">Name of option that is being extended...</dd>
<dt>marked </dt>
<dd class="description">Extended option is marked</dd>
<dt>option </dt>
<dd class="description">Option that is being extended...</dd>
<dt>params </dt>
<dd class="description">Parameters</dd>
</dl>
<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
<p class="description">Custom Parameter </p>
<p class="code">struct ppd_cparam_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cpvalue_t">ppd_cpvalue_t</a> current;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cplimit_t">ppd_cplimit_t</a> minimum, maximum;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;int order;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cptype_t">ppd_cptype_t</a> type;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>current </dt>
<dd class="description">Current value</dd>
<dt>maximum </dt>
<dd class="description">Maximum value</dd>
<dt>name[PPD_MAX_NAME] </dt>
<dd class="description">Parameter name</dd>
<dt>order </dt>
<dd class="description">Order (0 to N)</dd>
<dt>text[PPD_MAX_TEXT] </dt>
<dd class="description">Human-readable text</dd>
<dt>type </dt>
<dd class="description">Parameter type</dd>
</dl>
<h3 class="struct"><a name="ppd_emul_s">ppd_emul_s</a></h3>
<p class="description">Emulators</p>
<p class="code">struct ppd_emul_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *start;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *stop;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>name[PPD_MAX_NAME] </dt>
<dd class="description">Emulator name</dd>
<dt>start </dt>
<dd class="description">Code to switch to this emulation</dd>
<dt>stop </dt>
<dd class="description">Code to stop this emulation</dd>
</dl>
<h3 class="struct"><a name="ppd_file_s">ppd_file_s</a></h3>
<p class="description">PPD File</p>
<p class="code">struct ppd_file_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;int accurate_screens;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int color_device;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cs_t">ppd_cs_t</a> colorspace;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_const_t">ppd_const_t</a> *consts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int contone_only;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_margins[4];<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_max[2];<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_min[2];<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_emul_t">ppd_emul_t</a> *emulations;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char **filters;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int flip_duplex;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char **fonts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_group_t">ppd_group_t</a> *groups;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_begin;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_end;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *jcl_ps;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int landscape;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *lang_encoding;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *lang_version;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int language_level;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int manual_copies;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *manufacturer;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int model_number;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *modelname;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *nickname;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_consts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_emulations;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_filters;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_fonts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_groups;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_profiles;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_sizes;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *patches;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *pcfilename;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *product;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_profile_t">ppd_profile_t</a> *profiles;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *protocols;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *shortnickname;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_size_t">ppd_size_t</a> *sizes;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int throughput;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *ttrasterizer;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int variable_sizes;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>accurate_screens </dt>
<dd class="description">1 = supports accurate screens, 0 = not</dd>
<dt>color_device </dt>
<dd class="description">1 = color device, 0 = grayscale</dd>
<dt>colorspace </dt>
<dd class="description">Default colorspace</dd>
<dt>consts </dt>
<dd class="description">UI/Non-UI constraints</dd>
<dt>contone_only </dt>
<dd class="description">1 = continuous tone only, 0 = not</dd>
<dt>custom_margins[4] </dt>
<dd class="description">Margins around page</dd>
<dt>custom_max[2] </dt>
<dd class="description">Maximum variable page size</dd>
<dt>custom_min[2] </dt>
<dd class="description">Minimum variable page size</dd>
<dt>emulations </dt>
<dd class="description">Emulations and the code to invoke them</dd>
<dt>filters </dt>
<dd class="description">Filter strings...</dd>
<dt>flip_duplex <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
<dd class="description">1 = Flip page for back sides </dd>
<dt>fonts </dt>
<dd class="description">Pre-loaded fonts</dd>
<dt>groups </dt>
<dd class="description">UI groups</dd>
<dt>jcl_begin </dt>
<dd class="description">Start JCL commands</dd>
<dt>jcl_end </dt>
<dd class="description">End JCL commands</dd>
<dt>jcl_ps </dt>
<dd class="description">Enter PostScript interpreter</dd>
<dt>landscape </dt>
<dd class="description">-90 or 90</dd>
<dt>lang_encoding </dt>
<dd class="description">Language encoding</dd>
<dt>lang_version </dt>
<dd class="description">Language version (English, Spanish, etc.)</dd>
<dt>language_level </dt>
<dd class="description">Language level of device</dd>
<dt>manual_copies </dt>
<dd class="description">1 = Copies done manually, 0 = hardware</dd>
<dt>manufacturer </dt>
<dd class="description">Manufacturer name</dd>
<dt>model_number </dt>
<dd class="description">Device-specific model number</dd>
<dt>modelname </dt>
<dd class="description">Model name (general)</dd>
<dt>nickname </dt>
<dd class="description">Nickname (specific)</dd>
<dt>num_consts </dt>
<dd class="description">Number of UI/Non-UI constraints</dd>
<dt>num_emulations </dt>
<dd class="description">Number of emulations supported</dd>
<dt>num_filters </dt>
<dd class="description">Number of filters</dd>
<dt>num_fonts </dt>
<dd class="description">Number of pre-loaded fonts</dd>
<dt>num_groups </dt>
<dd class="description">Number of UI groups</dd>
<dt>num_profiles <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
<dd class="description">Number of sRGB color profiles </dd>
<dt>num_sizes </dt>
<dd class="description">Number of page sizes</dd>
<dt>patches </dt>
<dd class="description">Patch commands to be sent to printer</dd>
<dt>pcfilename <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
<dd class="description">PCFileName string </dd>
<dt>product </dt>
<dd class="description">Product name (from PS RIP/interpreter)</dd>
<dt>profiles <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
<dd class="description">sRGB color profiles </dd>
<dt>protocols <span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span></dt>
<dd class="description">Protocols (BCP, TBCP) string </dd>
<dt>shortnickname </dt>
<dd class="description">Short version of nickname</dd>
<dt>sizes </dt>
<dd class="description">Page sizes</dd>
<dt>throughput </dt>
<dd class="description">Pages per minute</dd>
<dt>ttrasterizer </dt>
<dd class="description">Truetype rasterizer</dd>
<dt>variable_sizes </dt>
<dd class="description">1 = supports variable sizes, 0 = doesn't</dd>
</dl>
<h3 class="struct"><a name="ppd_group_s">ppd_group_s</a></h3>
<p class="description">Groups</p>
<p class="code">struct ppd_group_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT - PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_options;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_subgroups;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_option_t">ppd_option_t</a> *options;<br>
&nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#ppd_group_s">ppd_group_s</a> *subgroups;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>PPD_MAX_NAME] </dt>
<dd class="description">Human-readable group name</dd>
<dt>name[PPD_MAX_NAME] <span class="info">&nbsp;CUPS 1.1.18/OS X 10.3&nbsp;</span></dt>
<dd class="description">Group name </dd>
<dt>num_options </dt>
<dd class="description">Number of options</dd>
<dt>num_subgroups </dt>
<dd class="description">Number of sub-groups</dd>
<dt>options </dt>
<dd class="description">Options</dd>
<dt>subgroups </dt>
<dd class="description">Sub-groups (max depth = 1)</dd>
</dl>
<h3 class="struct"><a name="ppd_option_s">ppd_option_s</a></h3>
<p class="description">Options</p>
<p class="code">struct ppd_option_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_choice_t">ppd_choice_t</a> *choices;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char conflicted;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char defchoice[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;int num_choices;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float order;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_section_t">ppd_section_t</a> section;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char text[PPD_MAX_TEXT];<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_ui_t">ppd_ui_t</a> ui;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>choices </dt>
<dd class="description">Option choices</dd>
<dt>conflicted </dt>
<dd class="description">0 if no conflicts exist, 1 otherwise</dd>
<dt>defchoice[PPD_MAX_NAME] </dt>
<dd class="description">Default option choice</dd>
<dt>keyword[PPD_MAX_NAME] </dt>
<dd class="description">Option keyword name (&quot;PageSize&quot;, etc.)</dd>
<dt>num_choices </dt>
<dd class="description">Number of option choices</dd>
<dt>order </dt>
<dd class="description">Order number</dd>
<dt>section </dt>
<dd class="description">Section for command</dd>
<dt>text[PPD_MAX_TEXT] </dt>
<dd class="description">Human-readable text</dd>
<dt>ui </dt>
<dd class="description">Type of UI option</dd>
</dl>
<h3 class="struct"><a name="ppd_profile_s">ppd_profile_s</a></h3>
<p class="description">sRGB Color Profiles</p>
<p class="code">struct ppd_profile_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;float density;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float gamma;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float matrix[3][3];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char media_type[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char resolution[PPD_MAX_NAME];<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>density </dt>
<dd class="description">Ink density to use</dd>
<dt>gamma </dt>
<dd class="description">Gamma correction to use</dd>
<dt>matrix[3][3] </dt>
<dd class="description">Transform matrix</dd>
<dt>media_type[PPD_MAX_NAME] </dt>
<dd class="description">Media type or &quot;-&quot;</dd>
<dt>resolution[PPD_MAX_NAME] </dt>
<dd class="description">Resolution or &quot;-&quot;</dd>
</dl>
<h3 class="struct"><a name="ppd_size_s">ppd_size_s</a></h3>
<p class="description">Page Sizes</p>
<p class="code">struct ppd_size_s {<br>
&nbsp;&nbsp;&nbsp;&nbsp;float bottom;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float left;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float length;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int marked;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
&nbsp;&nbsp;&nbsp;&nbsp;float right;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float top;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float width;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>bottom </dt>
<dd class="description">Bottom printable margin in points</dd>
<dt>left </dt>
<dd class="description">Left printable margin in points</dd>
<dt>length </dt>
<dd class="description">Length of media in points</dd>
<dt>marked </dt>
<dd class="description">Page size selected?</dd>
<dt>name[PPD_MAX_NAME] </dt>
<dd class="description">Media size option</dd>
<dt>right </dt>
<dd class="description">Right printable margin in points</dd>
<dt>top </dt>
<dd class="description">Top printable margin in points</dd>
<dt>width </dt>
<dd class="description">Width of media in points</dd>
</dl>
<h2 class="title"><a name="UNIONS">Unions</a></h2>
<h3 class="union"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
<p class="description">Custom Parameter Limit </p>
<p class="code">union ppd_cplimit_u {<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int custom_int;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_invcurve;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int custom_passcode;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int custom_password;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_points;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_real;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int custom_string;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>custom_curve </dt>
<dd class="description">Gamma value</dd>
<dt>custom_int </dt>
<dd class="description">Integer value</dd>
<dt>custom_invcurve </dt>
<dd class="description">Gamma value</dd>
<dt>custom_passcode </dt>
<dd class="description">Passcode length</dd>
<dt>custom_password </dt>
<dd class="description">Password length</dd>
<dt>custom_points </dt>
<dd class="description">Measurement value</dd>
<dt>custom_real </dt>
<dd class="description">Real value</dd>
<dt>custom_string </dt>
<dd class="description">String length</dd>
</dl>
<h3 class="union"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
<p class="description">Custom Parameter Value </p>
<p class="code">union ppd_cpvalue_u {<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
&nbsp;&nbsp;&nbsp;&nbsp;int custom_int;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_invcurve;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *custom_passcode;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *custom_password;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_points;<br>
&nbsp;&nbsp;&nbsp;&nbsp;float custom_real;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char *custom_string;<br>
};</p>
<h4 class="members">Members</h4>
<dl>
<dt>custom_curve </dt>
<dd class="description">Gamma value</dd>
<dt>custom_int </dt>
<dd class="description">Integer value</dd>
<dt>custom_invcurve </dt>
<dd class="description">Gamma value</dd>
<dt>custom_passcode </dt>
<dd class="description">Passcode value</dd>
<dt>custom_password </dt>
<dd class="description">Password value</dd>
<dt>custom_points </dt>
<dd class="description">Measurement value</dd>
<dt>custom_real </dt>
<dd class="description">Real value</dd>
<dt>custom_string </dt>
<dd class="description">String value</dd>
</dl>
<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_conform_e">ppd_conform_e</a></h3>
<p class="description">Conformance Levels </p>
<h4 class="constants">Constants</h4>
<dl>
<dt>PPD_CONFORM_RELAXED </dt>
<dd class="description">Relax whitespace and control char</dd>
<dt>PPD_CONFORM_STRICT </dt>
<dd class="description">Require strict conformance</dd>
</dl>
<h3 class="enumeration"><a name="ppd_cs_e">ppd_cs_e</a></h3>
<p class="description">Colorspaces</p>
<h4 class="constants">Constants</h4>
<dl>
<dt>PPD_CS_CMY </dt>
<dd class="description">CMY colorspace</dd>
<dt>PPD_CS_CMYK </dt>
<dd class="description">CMYK colorspace</dd>
<dt>PPD_CS_GRAY </dt>
<dd class="description">Grayscale colorspace</dd>
<dt>PPD_CS_N </dt>
<dd class="description">DeviceN colorspace</dd>
<dt>PPD_CS_RGB </dt>
<dd class="description">RGB colorspace</dd>
<dt>PPD_CS_RGBK </dt>
<dd class="description">RGBK (K = gray) colorspace</dd>
</dl>
<h3 class="enumeration"><a name="ppd_section_e">ppd_section_e</a></h3>
<p class="description">Order dependency sections</p>
<h4 class="constants">Constants</h4>
<dl>
<dt>PPD_ORDER_ANY </dt>
<dd class="description">Option code can be anywhere in the file</dd>
<dt>PPD_ORDER_DOCUMENT </dt>
<dd class="description">... must be in the DocumentSetup section</dd>
<dt>PPD_ORDER_EXIT </dt>
<dd class="description">... must be sent prior to the document</dd>
<dt>PPD_ORDER_JCL </dt>
<dd class="description">... must be sent as a JCL command</dd>
<dt>PPD_ORDER_PAGE </dt>
<dd class="description">... must be in the PageSetup section</dd>
<dt>PPD_ORDER_PROLOG </dt>
<dd class="description">... must be in the Prolog section</dd>
</dl>
<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ppd_status_e">ppd_status_e</a></h3>
<p class="description">Status Codes </p>
<h4 class="constants">Constants</h4>
<dl>
<dt>PPD_ALLOC_ERROR </dt>
<dd class="description">Memory allocation error</dd>
<dt>PPD_BAD_CUSTOM_PARAM </dt>
<dd class="description">Bad custom parameter</dd>
<dt>PPD_BAD_OPEN_GROUP </dt>
<dd class="description">Bad OpenGroup</dd>
<dt>PPD_BAD_OPEN_UI </dt>
<dd class="description">Bad OpenUI/JCLOpenUI</dd>
<dt>PPD_BAD_ORDER_DEPENDENCY </dt>
<dd class="description">Bad OrderDependency</dd>
<dt>PPD_BAD_UI_CONSTRAINTS </dt>
<dd class="description">Bad UIConstraints</dd>
<dt>PPD_BAD_VALUE </dt>
<dd class="description">Bad value string</dd>
<dt>PPD_FILE_OPEN_ERROR </dt>
<dd class="description">Unable to open PPD file</dd>
<dt>PPD_ILLEGAL_CHARACTER </dt>
<dd class="description">Illegal control character</dd>
<dt>PPD_ILLEGAL_MAIN_KEYWORD </dt>
<dd class="description">Illegal main keyword string</dd>
<dt>PPD_ILLEGAL_OPTION_KEYWORD </dt>
<dd class="description">Illegal option keyword string</dd>
<dt>PPD_ILLEGAL_TRANSLATION </dt>
<dd class="description">Illegal translation string</dd>
<dt>PPD_ILLEGAL_WHITESPACE </dt>
<dd class="description">Illegal whitespace character</dd>
<dt>PPD_INTERNAL_ERROR </dt>
<dd class="description">Internal error</dd>
<dt>PPD_LINE_TOO_LONG </dt>
<dd class="description">Line longer than 255 chars</dd>
<dt>PPD_MISSING_ASTERISK </dt>
<dd class="description">Missing asterisk in column 0</dd>
<dt>PPD_MISSING_CLOSE_GROUP </dt>
<dd class="description">Missing CloseGroup</dd>
<dt>PPD_MISSING_OPTION_KEYWORD </dt>
<dd class="description">Missing option keyword</dd>
<dt>PPD_MISSING_PPDADOBE4 </dt>
<dd class="description">Missing PPD-Adobe-4.x header</dd>
<dt>PPD_MISSING_VALUE </dt>
<dd class="description">Missing value string</dd>
<dt>PPD_NESTED_OPEN_GROUP </dt>
<dd class="description">OpenGroup without a CloseGroup first</dd>
<dt>PPD_NESTED_OPEN_UI </dt>
<dd class="description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first</dd>
<dt>PPD_NULL_FILE </dt>
<dd class="description">NULL PPD file pointer</dd>
<dt>PPD_OK </dt>
<dd class="description">OK</dd>
</dl>
<h3 class="enumeration"><a name="ppd_ui_e">ppd_ui_e</a></h3>
<p class="description">UI Types</p>
<h4 class="constants">Constants</h4>
<dl>
<dt>PPD_UI_BOOLEAN </dt>
<dd class="description">True or False option</dd>
<dt>PPD_UI_PICKMANY </dt>
<dd class="description">Pick zero or more from a list</dd>
<dt>PPD_UI_PICKONE </dt>
<dd class="description">Pick one from a list</dd>
</dl>
</div>
</body>
</html>