Beispiel #1
0
        /// <summary>
        /// Creates new document instance
        /// </summary>
        public Document()
        {
            _metadata = new Metadata();
            _manifest = new Manifest();
            _spine = new Spine();
            _guide = new Guide();
            _ncx = new NCX();
            _container = new Container();
            _ids = new Dictionary<string, int>();

            // setup mandatory TOC file
            _manifest.AddItem("ncx", "toc.ncx", "application/x-dtbncx+xml");
            _spine.SetToc("ncx");
            _container.AddRootFile("OPF/content.opf", "application/oebps-package+xml");
            Guid guid = Guid.NewGuid();
            string uuid = "urn:uuid:" + guid.ToString();
            _ncx.SetUid(uuid);
            _metadata.AddBookIdentifier("BookId", uuid);
        }
Beispiel #2
0
        /// <summary>
        /// Creates new document instance
        /// </summary>
        public Document()
        {
            _metadata  = new Metadata();
            _manifest  = new Manifest();
            _spine     = new Spine();
            _guide     = new Guide();
            _ncx       = new NCX();
            _container = new Container();
            _ids       = new Dictionary <string, int>();

            // setup mandatory TOC file
            _manifest.AddItem("ncx", "toc.ncx", "application/x-dtbncx+xml");
            _spine.SetToc("ncx");
            _container.AddRootFile("OPF/content.opf", "application/oebps-package+xml");
            Guid   guid = Guid.NewGuid();
            string uuid = "urn:uuid:" + guid.ToString();

            _ncx.SetUid(uuid);
            _metadata.AddBookIdentifier("BookId", uuid);
        }