| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfPDF_XOutputIntentDictionary | 1 #ifndef __DEFINED__SkPdfPDF_XOutputIntentDictionary |
| 2 #define __DEFINED__SkPdfPDF_XOutputIntentDictionary | 2 #define __DEFINED__SkPdfPDF_XOutputIntentDictionary |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Entries in a PDF/X output intent dictionary | 9 // Entries in a PDF/X output intent dictionary |
| 10 class SkPdfPDF_XOutputIntentDictionary : public SkPdfDictionary { | 10 class SkPdfPDF_XOutputIntentDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfPDF_XOutputIntentDictionary& operator=(const SkPdfPDF_XOutputIntentDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 526 SkPdfPDF_XOutputIntentDictionary& operator=(const SkPdfPDF_XOutputIntentDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
| 527 | 527 |
| 528 /** (Optional) The type of PDF object that this dictionary describes; | 528 /** (Optional) The type of PDF object that this dictionary describes; |
| 529 * if present, must be OutputIntent for an output intent dictionary. | 529 * if present, must be OutputIntent for an output intent dictionary. |
| 530 **/ | 530 **/ |
| 531 bool has_Type() const { | 531 bool has_Type() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Type() const { | 535 std::string Type() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The output intent subtype; must be GTS_PDFX for a | 536 /** (Required) The output intent subtype; must be GTS_PDFX for a |
| 543 * PDF/X output intent. | 537 * PDF/X output intent. |
| 544 **/ | 538 **/ |
| 545 bool has_S() const { | 539 bool has_S() const { |
| 546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 547 } | 541 } |
| 548 | 542 |
| 549 std::string S() const { | 543 std::string S() const; |
| 550 std::string ret; | |
| 551 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
| 552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 553 return ""; | |
| 554 } | |
| 555 | |
| 556 /** (Optional) A text string concisely identifying the intended out- | 544 /** (Optional) A text string concisely identifying the intended out- |
| 557 * put device or production condition in human-readable form. | 545 * put device or production condition in human-readable form. |
| 558 * This is the preferred method of defining such a string for pre- | 546 * This is the preferred method of defining such a string for pre- |
| 559 * sentation to the user. | 547 * sentation to the user. |
| 560 **/ | 548 **/ |
| 561 bool has_OutputCondition() const { | 549 bool has_OutputCondition() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outpu
tCondition", "", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outpu
tCondition", "", NULL)); |
| 563 } | 551 } |
| 564 | 552 |
| 565 std::string OutputCondition() const { | 553 std::string OutputCondition() const; |
| 566 std::string ret; | |
| 567 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputCon
dition", "", &ret)) return ret; | |
| 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 569 return ""; | |
| 570 } | |
| 571 | |
| 572 /** (Required) A string identifying the intended output device or | 554 /** (Required) A string identifying the intended output device or |
| 573 * production condition in human- or machine-readable form. If | 555 * production condition in human- or machine-readable form. If |
| 574 * human-readable, this string may be used in lieu of an Output- | 556 * human-readable, this string may be used in lieu of an Output- |
| 575 * Condition string for presentation to the user. | 557 * Condition string for presentation to the user. |
| 576 * A typical value for this entry would be the name of a production | 558 * A typical value for this entry would be the name of a production |
| 577 * condition maintained in an industry-standard registry such as | 559 * condition maintained in an industry-standard registry such as |
| 578 * the ICC Characterization Data Registry (see the Bibliography). If | 560 * the ICC Characterization Data Registry (see the Bibliography). If |
| 579 * the designated condition matches that in effect at production | 561 * the designated condition matches that in effect at production |
| 580 * time, it is the responsibility of the production software to pro- | 562 * time, it is the responsibility of the production software to pro- |
| 581 * vide the corresponding ICC profile as defined in the registry. | 563 * vide the corresponding ICC profile as defined in the registry. |
| 582 * If the intended production condition is not a recognized | 564 * If the intended production condition is not a recognized |
| 583 * standard, the value Custom is recommended for this entry; the | 565 * standard, the value Custom is recommended for this entry; the |
| 584 * DestOutputProfile entry defines the ICC profile and the Info | 566 * DestOutputProfile entry defines the ICC profile and the Info |
| 585 * entry is used for further human-readable identification. | 567 * entry is used for further human-readable identification. |
| 586 **/ | 568 **/ |
| 587 bool has_OutputConditionIdentifier() const { | 569 bool has_OutputConditionIdentifier() const { |
| 588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outpu
tConditionIdentifier", "", NULL)); | 570 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outpu
tConditionIdentifier", "", NULL)); |
| 589 } | 571 } |
| 590 | 572 |
| 591 std::string OutputConditionIdentifier() const { | 573 std::string OutputConditionIdentifier() const; |
| 592 std::string ret; | |
| 593 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputCon
ditionIdentifier", "", &ret)) return ret; | |
| 594 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 595 return ""; | |
| 596 } | |
| 597 | |
| 598 /** (Optional) A string (conventionally a uniform resource identifi- | 574 /** (Optional) A string (conventionally a uniform resource identifi- |
| 599 * er, or URI) identifying the registry in which the condition desig- | 575 * er, or URI) identifying the registry in which the condition desig- |
| 600 * nated by OutputConditionIdentifier is defined. | 576 * nated by OutputConditionIdentifier is defined. |
| 601 **/ | 577 **/ |
| 602 bool has_RegistryName() const { | 578 bool has_RegistryName() const { |
| 603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Regis
tryName", "", NULL)); | 579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Regis
tryName", "", NULL)); |
| 604 } | 580 } |
| 605 | 581 |
| 606 std::string RegistryName() const { | 582 std::string RegistryName() const; |
| 607 std::string ret; | |
| 608 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RegistryN
ame", "", &ret)) return ret; | |
| 609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 610 return ""; | |
| 611 } | |
| 612 | |
| 613 /** (Required if OutputConditionIdentifier does not specify a standard | 583 /** (Required if OutputConditionIdentifier does not specify a standard |
| 614 * production condition; optional otherwise) A human-readable text | 584 * production condition; optional otherwise) A human-readable text |
| 615 * string containing additional information or comments about | 585 * string containing additional information or comments about |
| 616 * the intended target device or production condition. | 586 * the intended target device or production condition. |
| 617 **/ | 587 **/ |
| 618 bool has_Info() const { | 588 bool has_Info() const { |
| 619 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info"
, "", NULL)); | 589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info"
, "", NULL)); |
| 620 } | 590 } |
| 621 | 591 |
| 622 std::string Info() const { | 592 std::string Info() const; |
| 623 std::string ret; | |
| 624 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", ""
, &ret)) return ret; | |
| 625 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 626 return ""; | |
| 627 } | |
| 628 | |
| 629 /** (Required if OutputConditionIdentifier does not specify a standard | 593 /** (Required if OutputConditionIdentifier does not specify a standard |
| 630 * production condition; optional otherwise) An ICC profile stream | 594 * production condition; optional otherwise) An ICC profile stream |
| 631 * defining the transformation from the PDF document's source | 595 * defining the transformation from the PDF document's source |
| 632 * colors to output device colorants. | 596 * colors to output device colorants. |
| 633 * The format of the profile stream is the same as that used in speci- | 597 * The format of the profile stream is the same as that used in speci- |
| 634 * fying an ICCBased color space (see "ICCBased Color Spaces" on | 598 * fying an ICCBased color space (see "ICCBased Color Spaces" on |
| 635 * page 189). The output transformation uses the profile's "from | 599 * page 189). The output transformation uses the profile's "from |
| 636 * CIE" information (BToA in ICC terminology); the "to CIE" | 600 * CIE" information (BToA in ICC terminology); the "to CIE" |
| 637 * (AToB) information can optionally be used to remap source | 601 * (AToB) information can optionally be used to remap source |
| 638 * color values to some other destination color space, such as for | 602 * color values to some other destination color space, such as for |
| 639 * screen preview or hardcopy proofing. (See implementation note | 603 * screen preview or hardcopy proofing. (See implementation note |
| 640 * 111 in Appendix H.) | 604 * 111 in Appendix H.) |
| 641 **/ | 605 **/ |
| 642 bool has_DestOutputProfile() const { | 606 bool has_DestOutputProfile() const { |
| 643 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DestO
utputProfile", "", NULL)); | 607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DestO
utputProfile", "", NULL)); |
| 644 } | 608 } |
| 645 | 609 |
| 646 SkPdfStream* DestOutputProfile() const { | 610 SkPdfStream* DestOutputProfile() const; |
| 647 SkPdfStream* ret; | |
| 648 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DestOutpu
tProfile", "", &ret)) return ret; | |
| 649 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 650 return NULL; | |
| 651 } | |
| 652 | |
| 653 }; | 611 }; |
| 654 | 612 |
| 655 #endif // __DEFINED__SkPdfPDF_XOutputIntentDictionary | 613 #endif // __DEFINED__SkPdfPDF_XOutputIntentDictionary |
| OLD | NEW |