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