/* istanbul ignore next */
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
define(["require", "exports", "./../primitives/pdf-dictionary", "./../input-output/pdf-dictionary-properties", "./../primitives/pdf-name", "./../primitives/pdf-reference", "./pdf-viewer-preferences"], function (require, exports, pdf_dictionary_1, pdf_dictionary_properties_1, pdf_name_1, pdf_reference_1, pdf_viewer_preferences_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var PdfCatalog = (function (_super) {
__extends(PdfCatalog, _super);
function PdfCatalog() {
var _this = _super.call(this) || this;
_this.sections = null;
_this.tempDictionaryProperties = new pdf_dictionary_properties_1.DictionaryProperties();
_this.items.setValue(new pdf_dictionary_properties_1.DictionaryProperties().type, new pdf_name_1.PdfName('Catalog'));
return _this;
}
Object.defineProperty(PdfCatalog.prototype, "pages", {
get: function () {
return this.sections;
},
set: function (value) {
var dictionary = value.element;
this.sections = value;
this.items.setValue(this.tempDictionaryProperties.pages, new pdf_reference_1.PdfReferenceHolder(value));
},
enumerable: true,
configurable: true
});
Object.defineProperty(PdfCatalog.prototype, "viewerPreferences", {
get: function () {
if (this._viewerPreferences === null || typeof this._viewerPreferences === 'undefined') {
this._viewerPreferences = new pdf_viewer_preferences_1.PdfViewerPreferences(this);
this.items.setValue(this.tempDictionaryProperties.viewerPreferences, new pdf_reference_1.PdfReferenceHolder(this._viewerPreferences.element));
}
return this._viewerPreferences;
},
enumerable: true,
configurable: true
});
return PdfCatalog;
}(pdf_dictionary_1.PdfDictionary));
exports.PdfCatalog = PdfCatalog;
});
|