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