OLD | NEW |
1 #ifndef __DEFINED__SkPdfDocumentInformationDictionary | 1 #ifndef __DEFINED__SkPdfDocumentInformationDictionary |
2 #define __DEFINED__SkPdfDocumentInformationDictionary | 2 #define __DEFINED__SkPdfDocumentInformationDictionary |
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 the document information dictionary | 9 // Entries in the document information dictionary |
10 class SkPdfDocumentInformationDictionary : public SkPdfDictionary { | 10 class SkPdfDocumentInformationDictionary : public SkPdfDictionary { |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 virtual bool valid() const {return true;} | 524 virtual bool valid() const {return true;} |
525 | 525 |
526 SkPdfDocumentInformationDictionary& operator=(const SkPdfDocumentInformationDi
ctionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPo
dofoObj; return *this;} | 526 SkPdfDocumentInformationDictionary& operator=(const SkPdfDocumentInformationDi
ctionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPo
dofoObj; return *this;} |
527 | 527 |
528 /** (Optional; PDF 1.1) The document's title. | 528 /** (Optional; PDF 1.1) The document's title. |
529 **/ | 529 **/ |
530 bool has_Title() const { | 530 bool has_Title() const { |
531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title
", "", NULL)); | 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title
", "", NULL)); |
532 } | 532 } |
533 | 533 |
534 std::string Title() const { | 534 std::string Title() const; |
535 std::string ret; | |
536 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "
", &ret)) return ret; | |
537 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
538 return ""; | |
539 } | |
540 | |
541 /** (Optional) The name of the person who created the document. | 535 /** (Optional) The name of the person who created the document. |
542 **/ | 536 **/ |
543 bool has_Author() const { | 537 bool has_Author() const { |
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Autho
r", "", NULL)); | 538 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Autho
r", "", NULL)); |
545 } | 539 } |
546 | 540 |
547 std::string Author() const { | 541 std::string Author() const; |
548 std::string ret; | |
549 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author",
"", &ret)) return ret; | |
550 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
551 return ""; | |
552 } | |
553 | |
554 /** (Optional; PDF 1.1) The subject of the document. | 542 /** (Optional; PDF 1.1) The subject of the document. |
555 **/ | 543 **/ |
556 bool has_Subject() const { | 544 bool has_Subject() const { |
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subje
ct", "", NULL)); | 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subje
ct", "", NULL)); |
558 } | 546 } |
559 | 547 |
560 std::string Subject() const { | 548 std::string Subject() const; |
561 std::string ret; | |
562 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject",
"", &ret)) return ret; | |
563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
564 return ""; | |
565 } | |
566 | |
567 /** (Optional; PDF 1.1) Keywords associated with the document. | 549 /** (Optional; PDF 1.1) Keywords associated with the document. |
568 **/ | 550 **/ |
569 bool has_Keywords() const { | 551 bool has_Keywords() const { |
570 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywo
rds", "", NULL)); | 552 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywo
rds", "", NULL)); |
571 } | 553 } |
572 | 554 |
573 std::string Keywords() const { | 555 std::string Keywords() const; |
574 std::string ret; | |
575 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords"
, "", &ret)) return ret; | |
576 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
577 return ""; | |
578 } | |
579 | |
580 /** (Optional) If the document was converted to PDF from another format, the | 556 /** (Optional) If the document was converted to PDF from another format, the |
581 * name of the application (for example, Adobe FrameMaker(R)) that created the | 557 * name of the application (for example, Adobe FrameMaker(R)) that created the |
582 * original document from which it was converted. | 558 * original document from which it was converted. |
583 **/ | 559 **/ |
584 bool has_Creator() const { | 560 bool has_Creator() const { |
585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
or", "", NULL)); | 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
or", "", NULL)); |
586 } | 562 } |
587 | 563 |
588 std::string Creator() const { | 564 std::string Creator() const; |
589 std::string ret; | |
590 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator",
"", &ret)) return ret; | |
591 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
592 return ""; | |
593 } | |
594 | |
595 /** (Optional) If the document was converted to PDF from another format, the | 565 /** (Optional) If the document was converted to PDF from another format, the |
596 * name of the application (for example, Acrobat Distiller) that converted it t
o | 566 * name of the application (for example, Acrobat Distiller) that converted it t
o |
597 * PDF. | 567 * PDF. |
598 **/ | 568 **/ |
599 bool has_Producer() const { | 569 bool has_Producer() const { |
600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Produ
cer", "", NULL)); | 570 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Produ
cer", "", NULL)); |
601 } | 571 } |
602 | 572 |
603 std::string Producer() const { | 573 std::string Producer() const; |
604 std::string ret; | |
605 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer"
, "", &ret)) return ret; | |
606 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
607 return ""; | |
608 } | |
609 | |
610 /** (Optional) The date and time the document was created, in human-readable | 574 /** (Optional) The date and time the document was created, in human-readable |
611 * form (see Section 3.8.2, "Dates"). | 575 * form (see Section 3.8.2, "Dates"). |
612 **/ | 576 **/ |
613 bool has_CreationDate() const { | 577 bool has_CreationDate() const { |
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
ionDate", "", NULL)); | 578 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
ionDate", "", NULL)); |
615 } | 579 } |
616 | 580 |
617 SkPdfDate CreationDate() const { | 581 SkPdfDate CreationDate() const; |
618 SkPdfDate ret; | |
619 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDat
e", "", &ret)) return ret; | |
620 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
621 return SkPdfDate(); | |
622 } | |
623 | |
624 /** (Optional; PDF 1.1) The date and time the document was most recently | 582 /** (Optional; PDF 1.1) The date and time the document was most recently |
625 * modified, in human-readable form (see Section 3.8.2, "Dates"). | 583 * modified, in human-readable form (see Section 3.8.2, "Dates"). |
626 **/ | 584 **/ |
627 bool has_ModDate() const { | 585 bool has_ModDate() const { |
628 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDa
te", "", NULL)); | 586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDa
te", "", NULL)); |
629 } | 587 } |
630 | 588 |
631 SkPdfDate ModDate() const { | 589 SkPdfDate ModDate() const; |
632 SkPdfDate ret; | |
633 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "
", &ret)) return ret; | |
634 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
635 return SkPdfDate(); | |
636 } | |
637 | |
638 /** (Optional; PDF 1.3) A name object indicating whether the document has | 590 /** (Optional; PDF 1.3) A name object indicating whether the document has |
639 * been modified to include trapping information (see Section 9.10.5, "Trap- | 591 * been modified to include trapping information (see Section 9.10.5, "Trap- |
640 * ping Support"): | 592 * ping Support"): |
641 * True The document has been fully trapped; no further trapping is | 593 * True The document has been fully trapped; no further trapping is |
642 * needed. (Note that this is the name True, not the boolean | 594 * needed. (Note that this is the name True, not the boolean |
643 * value true.) | 595 * value true.) |
644 * False The document has not yet been trapped; any desired trap- | 596 * False The document has not yet been trapped; any desired trap- |
645 * ping must still be done. (Note that this is the name False,
not | 597 * ping must still be done. (Note that this is the name False,
not |
646 * the boolean value false.) | 598 * the boolean value false.) |
647 * Unknown Either it is unknown whether the document has been | 599 * Unknown Either it is unknown whether the document has been |
648 * trapped or it has been partly but not yet fully trapped; som
e | 600 * trapped or it has been partly but not yet fully trapped; som
e |
649 * additional trapping may still be needed. | 601 * additional trapping may still be needed. |
650 * Default value: Unknown. | 602 * Default value: Unknown. |
651 * The value of this entry may be set automatically by the software creating th
e | 603 * The value of this entry may be set automatically by the software creating th
e |
652 * document's trapping information or may be known only to a human opera- | 604 * document's trapping information or may be known only to a human opera- |
653 * tor and entered manually. | 605 * tor and entered manually. |
654 **/ | 606 **/ |
655 bool has_Trapped() const { | 607 bool has_Trapped() const { |
656 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapp
ed", "", NULL)); | 608 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapp
ed", "", NULL)); |
657 } | 609 } |
658 | 610 |
659 std::string Trapped() const { | 611 std::string Trapped() const; |
660 std::string ret; | |
661 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "
", &ret)) return ret; | |
662 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
663 return ""; | |
664 } | |
665 | |
666 }; | 612 }; |
667 | 613 |
668 #endif // __DEFINED__SkPdfDocumentInformationDictionary | 614 #endif // __DEFINED__SkPdfDocumentInformationDictionary |
OLD | NEW |