Esempio n. 1
0
        public GuidePage( Guide g, Page p, int ind)
        {
            this.guide = g;
            this.page = p;
            this.idx = ind;

            pageBounds = new Bounds( page.Bounds);
            contentBounds = Bounds.GetContentBounds(g.document, page);

            //currentY = contentBounds.top;
        }
Esempio n. 2
0
        static void DoLayout()
        {
            OpenBook();
            //book = application.ActiveBook;
            contents = book.BookContents;

            //Console.WriteLine("Repaginating of " + book.Name);
            //book.Repaginate();

            int sideBarMax = 0;
            int sideBarCount = 0;

            //foreach (BookContent bookContent in contents)

            int skipTo = 1;

            for (int i=skipTo; i<=contents.Count; i++)
            {
                BookContent bookContent = contents[i];

                application.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idNeverInteract;

                string name = bookContent.FullName;

                Console.WriteLine("Processing " + name);

                Document document = (Document) application.Open(name, true);

                string sSideBarMax = GetConfig(document.Name.Replace(".indd",""), "SideBarMax");
                if (sSideBarMax != null && sSideBarMax.Length > 0)
                {
                    sideBarMax = Int32.Parse(sSideBarMax);
                    sideBarCount = 1;
                }
                else
                    sideBarCount++;

                Guide guide = new Guide(application, document);
                guide.bookContent = bookContent;
                guide.sideBarMax = sideBarMax;
                guide.sideBarCount = sideBarCount;

                guide.LayoutGuide(forceUpdate || argslist.Contains(document.Name) );

            }

            // close book
            book.Close(idSaveOptions.idYes, miss, miss, true);
        }